You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/09/19 06:17:47 UTC
[PR] [Backport maven-4.0.x] Fix #13189: mvnup generates invalid JDK version constraint '(,-1]' [maven]
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Backport maven-4.0.x] Fix #13189: mvnup generates invalid JDK version constraint '(,-1]' [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #13199:
URL: https://github.com/apache/maven/pull/13199
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org