Project Version

mvn versions:set versions:update-child-modules -DparsedVersion.majorVersion=2 -DparsedVersion.minorVersion=1 -DparsedVersion.incrementalVersion=0 -DbuildId=SNAPSHOT
mvn clean install

In this example, we update the project version to 2.1.0-SNAPSHOT.

Upgrading parent version of project

When a project parent version has changed. To update the project parent version to latest

mvn validate -DallowSnapshots=true versions:update-parent versions:update-child-modules
mvn clean install

Upgrading versions inside properties to latest

To update the version of dependencies specified in properties section of the pom to latest. Please note: maven-version-plugin is used to restrict the properties to be updated. Check “versions-maven-plugin.includeProperties” property.

mvn validate -DallowSnapshots=true versions:update-properties versions:update-child-modules
mvn clean install