Skip to content
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

Determining the required Maven version for plugins is incorrect #526

Closed
kwin opened this issue Jan 10, 2022 · 0 comments · Fixed by #527
Closed

Determining the required Maven version for plugins is incorrect #526

kwin opened this issue Jan 10, 2022 · 0 comments · Fixed by #527
Assignees

Comments

@kwin
Copy link
Contributor

kwin commented Jan 10, 2022

The goal display-plugin-updates leverages RequiredMavenVersionFinder in
https://github.com/mojohaus/versions-maven-plugin/blob/04afc2c4b9c98cb9ff7cf4f8e0b7d5678cf58fe7/src/main/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojo.java#L825 to determine the minimum required Maven version for a plugin.
That leverages both prerequisites and maven-enforcer-plugin configuration to determine the minimum Maven version and uses the maximum from both in https://github.com/mojohaus/versions-maven-plugin/blob/04afc2c4b9c98cb9ff7cf4f8e0b7d5678cf58fe7/src/main/java/org/codehaus/mojo/versions/RequiredMavenVersionFinder.java#L32.

For plugins only the former does matter, as the latter would only apply if you are interested in building the Maven plugin. For executing maven-plugins only the prerequisites section from the Maven pom.xml counts!

For example the mechanism fails for https://github.com/apache/jackrabbit-filevault-package-maven-plugin/blob/1857619d70082f586c510a71e60934d127151d53/pom.xml#L52 which requires 3.3.9 at run time but 3.6.1 at build time (https://github.com/apache/jackrabbit-filevault/blob/561aaa092d721963f16b860de955e6d1752a350e/parent/pom.xml#L56 and https://github.com/apache/maven-apache-parent/blob/061e19af986a914df4d37b14e7e53a079d9033c5/pom.xml#L337

kwin added a commit to kwin/versions-maven-plugin that referenced this issue Jan 11, 2022
for running

Separate minimal Maven version detection for projects from requirements
of plugins
This closes mojohaus#526
@stefanseifert stefanseifert self-assigned this Jan 12, 2022
stefanseifert pushed a commit that referenced this issue Jan 13, 2022
…an for running (#527)

Separate minimal Maven version detection for projects from requirements of plugins
This closes #526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants