-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Allow a Maven plugin to require a Java version #11479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow a Maven plugin to require a Java version #11479
Conversation
|
Great feature! |
Introduced in Maven 4.0.0-alpha-3 - MNG-7566 Plugin tools generate it since 3.8.1 - MPLUGIN-425 As many plugins required newer JDK we can introduce it also for Maven 3.x for better error reporting
a44735a to
5d401f6
Compare
maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
Show resolved
Hide resolved
|
Nice idea. Then versions-plugin can use this informations to limit offered version upgrades |
Yep. An in addition enforcer-plugin (or dependency plugin?) could extend to check if minimum java version is valid in terms of required version |
|
Really needed these days, if we can have something similar for extensions it would be useful as well! |
|
Another thought: Maybe extend it (from the beginning on) with a maximum Java version to define "this works not on Java Y or higher, please update to a newer plugin version" or something like this? This would allow maintainers who explict define ranges, esp when maintaining multiple releases. Ofc it does not help in all cases. |
The filed |
Introduced in Maven 4.0.0-alpha-3 - MNG-7566
Plugin tools generate it since 3.8.1 - MPLUGIN-425
As many plugins required newer JDK we can introduce it also for Maven 3.x for better error reporting
Following this checklist to help us incorporate your
contribution quickly and easily:
Note that commits might be squashed by a maintainer on merge.
This may not always be possible but is a best-practice.
mvn verifyto make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.