-
Notifications
You must be signed in to change notification settings - Fork 267
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
update-properties doesn't seem to respect allowMajorUpdates parameter #552
Comments
the same doc:
What if you set it to |
Yes, sorry, that's what I've been doing. I will update the bug description to clarify this. |
Getting similar (for artifact with the latest version in central 3.0.0-M5) result. I'm pretty sure it's due to the fact, that every rc, m, alpha, beta, snapshot releases are still considered as But if my project depends on
Also see https://maven.apache.org/pom.html#Version_Order_Specification. |
That is technically true, but wouldn't you agree that it would still constitute a major version update?
Yes, this correct behavior is also what I've been seeing with other dependencies.
I was vaguely aware of this but thanks for bringing it to my attention, it's very helpful. This part in particular:
So I understand the technical reason why allowMajorUpdates (and others?) works like it does, but the allowMajorUpdates name doesn't communicate that it relies on this behavior -- the "major" part even implies that it should behave like I assume Gradle does. I don't think you would break a lot by changing this behavior so that 2.0-rc1 is excluded from upgrades, as I don't think many users depend on it, in fact they would probably find it surprising. Failing that, maybe an additional parameter could control whether to use the current behavior or one where 2.0-rc1 would not be a valid target. |
Yes, yes I would! I was surprised by the current behaviour as well. |
This has been addressed in #753 which is already available in the latest release (2.13.0) @slachiewicz please close |
I'm writing a CI script to update properties that define versions to the latest stable version, but without breaking the build -- so major updates are not allowed.
mvn versions:update-properties -DallowMajorUpdates=false
should be ideal for this, but it doesn't appear to work as advertised:The lombok and junit updates are as expected, but the slf4j update is obviously a major version change!
The doc:
from http://www.mojohaus.org/versions-maven-plugin/update-properties-mojo.html#allowMajorUpdates
This is
versions-maven-plugin:2.9.0:update-properties
.The text was updated successfully, but these errors were encountered: