arturobernalg opened a new pull request, #215:
URL: https://github.com/apache/maven-toolchains-plugin/pull/215

   SelectJdkToolchainMojo.matches() delegated <version> requirement matching to 
DefaultArtifactVersion via RequirementMatcherFactory, Maven's generic 
artifact-version comparator. It doesn't parse the legacy (pre-Java 9) 
"1.8.0_432" scheme, so a requirement of "8", "1.8" or "1.8.0" never matched an 
auto-discovered or configured JDK 8 toolchain, even though they name the same 
feature release. The same gap exists for the current (JEP 223) scheme: a bare 
"21" doesn't match an actual "21.0.1" either, unless a version range is used.
   
   Keep the existing matcher as the primary check (it already handles exact 
matches and ranges correctly), and fall back to comparing JDK feature versions 
directly - the same normalization javac/java apply under JEP 223 - when it 
doesn't match.
   
   Fixes #118
   
   ---
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [x] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to