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

Switch to formatter-maven-plugin for code formatting #125

Closed
marcwrobel opened this issue Jul 6, 2022 · 0 comments
Closed

Switch to formatter-maven-plugin for code formatting #125

marcwrobel opened this issue Jul 6, 2022 · 0 comments
Labels
Milestone

Comments

@marcwrobel
Copy link
Owner

marcwrobel commented Jul 6, 2022

git-code-format-maven-plugin is based on google-java-format java format for code formatting. But when running on JDK 16 and newer, due to JEP 396: Strongly Encapsulate JDK Internals by Default, it requires adding multiple --add-exports to be set. This is an issue because --add-exports is not a valid option on JDK 8 and using -XX:+IgnoreUnrecognizedVMOptions does not help.

We need to continue running our tests against JDK 8, so instead of git-code-format-maven-plugin we will use formatter-maven-plugin 2.16 (2.17+ requires java 11+) for code formatting.

Note that we still need to using a JDK 17 in order to correctly generate javadoc (see #119).

marcwrobel added a commit that referenced this issue Jul 6, 2022
git-code-format-maven-plugin is based on google-java-format java format for code formatting. But when running on JDK 16 and newer, due to JEP 396: Strongly Encapsulate JDK Internals by Default, it requires adding multiple --add-exports to be set. This is an issue because --add-exports is not a valid option on JDK 8 and using -XX:+IgnoreUnrecognizedVMOptions does not help.

We need to continue running our tests against JDK 8, so instead of git-code-format-maven-plugin we will use formatter-maven-plugin 2.16 (2.17+ requires java 11+) for code formatting.
marcwrobel added a commit that referenced this issue Jul 7, 2022
@marcwrobel marcwrobel added this to the 3.3.0 milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant