-
Notifications
You must be signed in to change notification settings - Fork 268
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
versions:display-plugin-updates does not understand maven-enforcer-plugin #48
Comments
Here is the archived version of that issue page: |
Yes, it seems that I am now in a damned-if-I-do, damned-if-I-don’t situation. I have added the enforcer plugin, but if I leave the prerequisites stanza in my |
The current version (2.3) of versions-maven-plugin does not correctly handle that. The correct way since Maven 3 is to remove the prerequisites for non-plugin projects. But the problem is located in the versions-maven-plugin. |
Hi, If this can help, here are some example with Maven v3.5.0 and versions plugin v2.4 using the command
pom-prereq.txt Cheers, |
@brunchboy , no, apparently not. @dannil gave a good summary here: #173 (comment) |
Sigh, indeed, I keep hoping a fixed version of the plugin will be released, but have been disappointed so far. |
A fix would be very nice as this is very confusing and the output of |
Confusingly, the plugin even tells me to use the enforcer despite not respecting the setting:
|
A release containing this would be highly appreciated. |
So is this fixed now? |
@garretwilson It works for me when I use versions-maven-plugin |
Woohoo! Yeah, I just tried it. I had to add the Maven Enforcer Plugin indicating a minimum Maven version of 3.0.5, but then it worked and I didn't have to use that incorrect |
@garretwilson I am not having the same luck, I still get the complaints about missing prerequisites even after adding explicit entries for |
You might try looking at the latest version of our GlobalMentor parent POM I just updated it this morning to fix this problem. We haven't yet released his artifact to Maven Central, so if you find a problem in it let me know! Hopefully it will point you to what you're missing—or indicate something I missed. |
Thanks, I think the problem was that I was only specifying the |
Thanks everyone for staying on this! As the originator of this issue, I can report that the fix is working as advertised for me. |
Another thing to watch out for is that your enforcer execution should have an id of |
As suggested in mojohaus/versions#48 (comment)
Interesting, what cares about the id? |
@brunchboy My understanding of this is a bit fuzzy but going by https://maven.apache.org/guides/mini/guide-default-execution-ids.html each plugin has a default execution id. If you want to override its default configuration (for example, by default the enforcer plugin does nothing) then you must specify the execution id you're trying to override. That way if a user invokes an unrelated task (e.g. I hope that helps. |
Our Maven configuration matches best practices: we no longer specify prerequisite and use the enforcer to specify the version of Maven we need. Unfortunately the default version of versions-maven-plugin doesn’t recognise this and complains about our valid configuration with a confusing message (see mojohaus/versions#48 for details). This patch enforces version 2.7 which works. Change-Id: I9af5d7803132c1ee5735d0797f37d2434cf812cf Signed-off-by: Stephen Kitt <[email protected]>
Our Maven configuration matches best practices: we no longer specify prerequisite and use the enforcer to specify the version of Maven we need. Unfortunately the default version of versions-maven-plugin doesn’t recognise this and complains about our valid configuration with a confusing message (see mojohaus/versions#48 for details). This patch enforces version 2.7 which works. Change-Id: I9af5d7803132c1ee5735d0797f37d2434cf812cf Signed-off-by: Stephen Kitt <[email protected]> (cherry picked from commit 8577b13)
The plugin documentation wasn't updated and it still talks about "taking care of Maven version prerequisites." |
Is this problem fixed, really? |
(This is more of a "did this tracker get lost in the transition to mojohaus" tracker than a new issue...)
I removed the deprecated prerequisites stanza from my POM in favor of using the enforcer plugin.
Now, when running versions:display-plugin-updates, existing updates are not found and a message is displayed stating that I need to add the prereqs info back into the POM.
According to http://stackoverflow.com/questions/29344809/versionsdisplay-plugin-updates-does-not-understand-maven-enforcer-plugin , there was a tracker (MVERSIONS-272) on codehaus for this issue.
I searched open and closed trackers here at mojohaus, and did not find anything.
Did the original tracker get closed, or did it just miss the transition?
The text was updated successfully, but these errors were encountered: