gnodet opened a new pull request, #13199:
URL: https://github.com/apache/maven/pull/13199

   ## Summary
   
   Backport of #13193 to `maven-4.0.x`.
   
   When `mvnup` processes a project whose `maven.compiler.release` (or 
`source`) is **≥ 8** and the running JDK is older than that source level (e.g. 
running JDK 17, source 21), `latestJdkForSourceLevel()` returns `-1`. 
Previously this `-1` was passed directly to `addToolchainsPlugin()`, producing 
the invalid version constraint `(,-1]` and a toolchain resolution failure.
   
   Fix: guard `latestJdk <= 0` in `doApply()`. When true, emit a warning 
explaining that the running JDK needs to be upgraded and skip toolchain 
injection.
   
   Includes the regression test from #13193.
   
   Fixes #13189.
   
   ---
   _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_
   


-- 
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