http://mojo.codehaus.org/versions-maven-plugin/update-properties-mojo.html
The Maven versions plugin versions:update-parent
only updates to the latest snapshot or release version.
However, I am currently on 1.1-SNAPSHOT and I have 1.1 and 2.0 versions of this parent. How can I update to 1.1?
NOTE: This is not a multi-module project. The parent is a company/project wide pom all projects inherit.
The Versions Maven Plugin is a Maven plugin which provides you the information of which libraries could be updated.
I got the same problem as you, but finally understood it was only accepting a range as input, not a single value, so in your case you should put:
mvn versions:update-parent -DparentVersion=[1.0,1.1]
This should select 1.1 if it exists in your repository.
Got the clue reading tickets in plugin bug tracker
This works:
mvn versions:update-parent -DparentVersion=[1.1]
The reason is : because the parentVersion property is expected to be a range, not a single version.
Then you can set "-DparentVersion=[14,16)
" as documented in versions-maven-plugin, but if you want to set a given version (eg 1.0), you must define a range with only one result, using bounding brackets : [1.0].
See versions range specification: http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html
This also works for a -SNAPSHOT
version if you don't forget to set allowSnapshots=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With