Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requires Static Transitive and the Maven-Javadoc-Plugin #551

Closed
A248 opened this issue May 18, 2021 · 2 comments
Closed

Requires Static Transitive and the Maven-Javadoc-Plugin #551

A248 opened this issue May 18, 2021 · 2 comments

Comments

@A248
Copy link
Contributor

A248 commented May 18, 2021

It seems like there is a bug in the maven-javadoc-plugin which prevents generating javadocs when depending on modules which use requires static transitive. No one else has confirmed this bug so far, but I'm highly sure of it. If you like, you can try the reproducer and confirm.

https://issues.apache.org/jira/projects/MJAVADOC/issues/MJAVADOC-677

In #540 the added module descriptor uses requires static transitive. This may surprise Maven users upgrading to 3.0.2 when their javadoc starts to fail. (In fact, this is where I ran into MJAVADOC-677 myself). I haven't checked but it's most likely that this only affects JPMS users - if it affected non-JPMS users this bug would have been reported much more widely.

Although requires static transitive is strictly speaking the correct directive in the current module descriptor, you may want to temporarily use requires transitive until a release version of the maven-javadoc-plugin contains a fix for this bug. I thought I would leave the decision up to you before filing a PR.

@ben-manes
Copy link
Owner

Thanks @A248. I would prefer to put pressure on Maven to fix their bug and resolving it rather than making dependencies implement a workaround.

JavaDoc usually doesn't require all dependencies, so you might be able to skip this if an error. Otherwise maybe the moditect could rewrite the descriptor in your build.

I'll try running the reproducer this evening to see if I have any suggestions.

@A248
Copy link
Contributor Author

A248 commented May 20, 2021

That's a reasonable decision. Maven still has some work to do with regards to JPMS support around the edge cases.

Don't worry about myself - this was more in case someone else had the same problem. After all, I wouldn't want to not report it considering I was the one who introduced the module descriptor PR.

I'll close this issue now since the bug belongs to the maven-javadoc-plugin and not caffeine.

@A248 A248 closed this as completed May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants