[MNG-8040] Allow prerequisites of maven plugins to define there minimum required java version
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Christoph Läubrich](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=laeubi)** opened **[MNG-8040](https://issues.apache.org/jira/browse/MNG-8040?redirect=false)** and commented
Currently the [prerequisites](https://maven.apache.org/pom.html#Prerequisites) of a maven-plugin to define a minimum maven version and then maven gives a nice message to the user if this is not meet.
Given the fast evolution of java versions plugins are facing another issue, e.g. if one of their dependencies require a **higher java version** than is the default for maven this currently fails with a rather cryptic "unsupported class version" error when running such a build.
It would therefore be good to extend the element so that plugins can declare:
```java
${minimal-maven-version}
${minimal-java-version}
```
please note that using [Maven Enforcer Plugin's](https://maven.apache.org/enforcer/index.html) is not an option here as it requires the user to know beforehand the java version of all its build plugins.
---
No further details from [MNG-8040](https://issues.apache.org/jira/browse/MNG-8040?redirect=false)
Contributor guide
Research direction
Start by reading the Maven prerequisites documentation and the linked MNG-8040 report, then trace how Maven currently handles a plugin's minimum Maven version. Define what support for a minimum Java version should look like, including the user-facing failure message, and verify that it addresses unsupported class-version failures without relying on the Maven Enforcer Plugin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100