Uh oh!
There was an error while loading. Please reload this page.
Bump build requirement to JDK 17 - #178
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.
jeremylong
commented
Mar 11, 2025
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 |
jeremylong
commented
Mar 11, 2025
Any chance you could add a |
ppkarwasz
commented
Mar 11, 2025
dwalluck
commented
Mar 11, 2025
Just a note that the spotbugs plugin would have to be bumped to 4.9.0 to support JDK 23. |
Uh oh!
There was an error while loading. Please reload this page.
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. |
dwalluck
commented
Mar 11, 2025
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. |
ppkarwasz
commented
Mar 11, 2025
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.
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.
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.
Got it - I've never set the Maven Toolchain up. Thanks for the explanation.
There was a problem hiding this comment.
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.
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.