update parent version to next release version

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

Tags:

Maven