Accept the 1.x spelling for the javac release version - #516
Merged
Merged
Conversation
-source and -target take both 8 and 1.8, --release takes only 8, and javac rejects the other form with "release version 1.8 not supported". Mapping 1.5 to 1.8 onto 5 to 8 lets a parent POM derive the release from the target a child already declares, whatever spelling it uses. The Eclipse compiler already does the same for 1.9.
slachiewicz
marked this pull request as ready for review
September 10, 2026 21:19
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
-sourceand-targetaccept both8and1.8, but--releaseonly accepts8, and javac rejects the other form withrelease version 1.8 not supported. This maps1.5to1.8onto5to8when building the--releaseargument and passes every other value through unchanged. The Eclipse compiler adapter already does this for1.9.This came out of apache/maven-apache-parent#608, where a parent deriving
maven.compiler.releasefrom a child'smaven.compiler.targetwas considered; that parent change was dropped because maven-compiler-plugin 4.x cannot combine the properties, so this is a standalone convenience: areleasewritten the waytargethas always been written works instead of failing.Verified:
mvn verify -pl plexus-compilers/plexus-compiler-javac -am→ 140 tests in the javac module, 0 failures, including the newtestReleaseVersionInLegacySpelling.This change was created with AI assistance.