While writing https://github.com/jenkinsci/jep/pull/400#issuecomment-1789790624 I realized that there was no good reason not to define maven.compiler.testRelease in terms of maven.compiler.release. When defined in this way, a consumer that wants to use two different values can still do so, but a consumer that simply wants to change bytecode generation from Java 11 bytecode to e.g. Java 17 bytecode now only has to change one property instead of two, which is a net benefit. As of this PR, there is just one occurrence of "11" in the POM, which is the maven.compiler.release property, and this now becomes the only knob that needs to be tuned to decide on which bytecode should be generated.
and verified that I could open the project in an IDE, write code with Java 17 language features in a test, and run the test successfully both in the IDE and on the command-line.
While writing https://github.com/jenkinsci/jep/pull/400#issuecomment-1789790624 I realized that there was no good reason not to define
maven.compiler.testRelease
in terms ofmaven.compiler.release
. When defined in this way, a consumer that wants to use two different values can still do so, but a consumer that simply wants to change bytecode generation from Java 11 bytecode to e.g. Java 17 bytecode now only has to change one property instead of two, which is a net benefit. As of this PR, there is just one occurrence of "11" in the POM, which is themaven.compiler.release
property, and this now becomes the only knob that needs to be tuned to decide on which bytecode should be generated.Testing done
In
text-finder-plugin
I appliedand verified that I could open the project in an IDE, write code with Java 17 language features in a test, and run the test successfully both in the IDE and on the command-line.