-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fix Javadoc JAR generation #246
Conversation
For performance reasons the Javadoc JARs are not generated when executing `mvn install`. They are generally only compiled when running `mvn release:perform`, as part of the `release` Maven profile. The downside of this setup is that Javadoc generation issues may not be caught until release time. This change resolves such an issue. To prevent future regressions Javadoc generation is now also performed by the GitHub Actions build workflow. While there, drop the deprecated `useReleaseProfile` configuration setting of the javadoc-maven-plugin, as its value matches the default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the goal were faster I would have preferred to just execute javadoc:jar
as part of a regular build, but at 7+ seconds that's hard to justify. There does not seem to be a jar-no-fork
-style alternative.
<additionalJOptions> | ||
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</additionalJOption> | ||
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</additionalJOption> | ||
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</additionalJOption> | ||
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</additionalJOption> | ||
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</additionalJOption> | ||
</additionalJOptions> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very happy that we have to duplicate this once more, but I found no way to deduplicate this between the maven-compiler-plugin
and maven-javadoc-plugin
.
- name: Build project against vanilla Error Prone, compile Javadoc | ||
run: mvn -T1C install javadoc:jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add another plugin execution to the release
profile then we should move the maven-gpg-plugin
execution to a secondary release profile and use -Prelease
rather than javadoc:jar
here, but I suppose that for now this'll do. (But it isn't strictly correct.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GHA fix is good enough for now.
Verified that it didn't work, but now works locally 😄.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanations offline. I agree with the expediency and making sure this step of the (currently manual) release process should just work and that this is nice to validate for now. In the future, once we go automated releases, it might indeed be nice to revisit this together with the profiles.
Updated the suggested commit message slightly (which we've not collaborately updated again).
Suggested commit message: