-
Notifications
You must be signed in to change notification settings - Fork 19
Bump build requirement to JDK 17 #178
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
Conversation
This change: - Bumps the build requirement for the project to JDK 17. - Adds a `java8-tests` profile that runs tests using JRE 8. The profile activates if a Maven Toolchains configuration file is present, i.e., the user knows about Maven Toolchains. Toolchains are automatically configured by `actions/setup-java`. - Bumps the version of Error Prone to a version compatible with JDK 17 (i.e., latest). - Bumps the version of Maven Surefire to a version that supports the `jdkToolchain` property. - Locks the version of the remaining plugins to the currently used versions.
|
Thanks! However, for the the CI to work we also need to update packageurl-java/.github/workflows/maven.yml Lines 10 to 11 in dd8309b
|
|
Any chance you could add a |
|
Just a note that the spotbugs plugin would have to be bumped to 4.9.0 to support JDK 23. |
I would bump all Maven plugins. Previously many plugin versions were not specified, so their versions were determined by the Maven Lifecycle Bindings and were different for each version of Maven. In this PR I fixed all the unspecified plugin versions to those of the Maven 3.8.7 Lifecycle Bindings (Debian 12 ships with Maven 3.8.7), but these are really old versions. |
|
I created #180 to try to prevent this, but I am not sure if your editor supports it https://editorconfig.org/#pre-installed. A missing newline in a text file actually violates the POSIX standard as far as I know. |
Sure, I'll enable the EditorConfig plugin. For Java code, however, I would enforce a more precise formatting (see #183 ).
Yes it does. |
| <profile> | ||
| <id>java8-tests</id> | ||
| <activation> | ||
| <file> | ||
| <exists>${user.home}/.m2/toolchains.xml</exists> | ||
| </file> | ||
| </activation> |
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.
I do not understand this profile. If the build requires Java 17, how could this be activated and work? What am I missing?
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 purpose of this profile is to run tests using JRE 8 in forked JVMs.
Since this can be only done through Maven Toolchains, which might be hard to configure for single-time contributors, the profile only activates if a toolchains configuration is present.
Note that the CI always has a toolchains configuration.
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.
Got it - I've never set the Maven Toolchain up. Thanks for the explanation.
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.
I hadn't really used it either, but since GitHub automatically sets up the file, it's pretty painless.
I think this pull request makes it so that it's not required (presumably, the CI will test Java 8 if the developer does not), but if you're interested, it has a mojo to automatically try to generate the config file mvn toolchains:generate-jdk-toolchains-xml.
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.
Cool! 💯
It discovered all 8 JDKs installed on my system.
This change:
java8-testsprofile that runs tests using JRE 8. The profile activates if a Maven Toolchains configuration file is present, i.e., the user knows about Maven Toolchains. Toolchains are automatically configured byactions/setup-java.jdkToolchainproperty.