Using following Maven command, the version of artifacts can be updated in a multi-module maven project.
mvn versions:set -DnewVersion='new-version'
For instance, the following maven command updates the version in POM.xml files of the enclosed moduels to 7.1.0-DEV-SNAPSHOT.
mvn versions:set -DnewVersion='7.1.0-DEV-SNAPSHOT'
Note that, by default this command creates a backup of the existing POM files. In essence, it creates a pom.xml.versionBackup
for each POM file. This behavior can be disabled as follows.
mvn versions:set -DnewVersion='7.1.0-DEV-SNAPSHOT' -DgenerateBackupPoms=false