Define maven.compiler.testRelease
in terms of maven.compiler.release
#850
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While writing jenkinsci/jep#400 (comment) 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.