Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@slawekjaranowski
Copy link
Member

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:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the Core IT successfully.

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.

@slawekjaranowski slawekjaranowski added mvn3 enhancement New feature or request labels Nov 22, 2025
@slawekjaranowski slawekjaranowski self-assigned this Nov 22, 2025
@slawekjaranowski
Copy link
Member Author

@Bukama
Copy link
Contributor

Bukama commented Nov 22, 2025

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
@slachiewicz
Copy link
Member

Nice idea. Then versions-plugin can use this informations to limit offered version upgrades

@Bukama
Copy link
Contributor

Bukama commented Nov 25, 2025

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

@laeubi
Copy link
Contributor

laeubi commented Nov 25, 2025

Really needed these days, if we can have something similar for extensions it would be useful as well!

@Bukama
Copy link
Contributor

Bukama commented Nov 25, 2025

Another thought:
This feature handles the Java versions as minimum Java version.

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.

@slawekjaranowski
Copy link
Member Author

Another thought: This feature handles the Java versions as minimum Java version.

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 requiredJavaVersion is generated by plugin tools and maintainers can provide a range
https://maven.apache.org/plugin-tools/maven-plugin-plugin/descriptor-mojo.html#requiredJavaVersion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request mvn3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants