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

Bug: prerequisites are not detected #990

Closed
cstamas opened this issue Jul 26, 2023 · 2 comments · Fixed by #994
Closed

Bug: prerequisites are not detected #990

cstamas opened this issue Jul 26, 2023 · 2 comments · Fixed by #994
Labels
Milestone

Comments

@cstamas
Copy link

cstamas commented Jul 26, 2023

When doing versions:display-plugin-updates on this module https://github.com/maveniverse/mima/tree/75a06a1132103506614b33a2cba2229923e86260/demo/library-maven-plugin

I get this message:

[INFO] --------< eu.maveniverse.maven.mima.demo:library-maven-plugin >---------
[INFO] Building eu.maveniverse.maven.mima.demo:library-maven-plugin 1.0.0-SNAPSHOT [5/5]
[INFO]   from library-maven-plugin/pom.xml
[INFO] ----------------------------[ maven-plugin ]----------------------------
[INFO] 
[INFO] --- versions:2.16.0:display-plugin-updates (default-cli) @ library-maven-plugin ---
[INFO] 
[INFO] All plugins with a version specified are using the latest versions.
[INFO] 
[INFO] All plugins have a version specified.
[INFO] 
[WARNING] Project does not define minimum Maven version required for build, default is: 3.2.5
[INFO] Plugins require minimum Maven version of: 3.2.5
[INFO] 
[WARNING] Project (which is a Maven plugin) does not define required minimum version of Maven.
[WARNING] Update the pom.xml to contain
[WARNING]     <prerequisites>
[WARNING]       <maven><!-- minimum version of Maven that the plugin works with --></maven>
[WARNING]     </prerequisites>
[WARNING] To build this plugin you need at least Maven 3.2.5
[WARNING] A Maven Enforcer rule can be used to enforce this if you have not already set one up
[WARNING] See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

But https://github.com/maveniverse/mima/blob/75a06a1132103506614b33a2cba2229923e86260/demo/library-maven-plugin/pom.xml#L46-L48

While true, I have no enforcer to enforce build time Maven version.

Still, why does plugin claim I have no prerequisites, while I do?

@slawekjaranowski
Copy link
Member

prerequisites is only used to define minimum Maven version required by plugin in run-time.
IMHO it does not have impact of required Maven version in build time - even it is Maven plugin project.

So message should be the same with info about missing enforcer configuration
regardless of the type of project packaging.

jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Jul 29, 2023
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Jul 29, 2023
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Jul 30, 2023
@jarmoniuk
Copy link
Contributor

jarmoniuk commented Jul 30, 2023

Is that correct that prerequisites can now also be used for non-plugin projects to specify the required maven version? Thus the distinction between plugin- and non-plugin projects in DisplayPluginUpdates should not be there anymore for establishing the version requirement for a POM?

jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Jul 30, 2023
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Jul 30, 2023
@slawekjaranowski slawekjaranowski added this to the next-release milestone Aug 17, 2023
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Aug 18, 2023
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Aug 18, 2023
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants