Control module version with Maven


I have a Java multi-module project with Maven.

I currently control the version of each module manually by editing the <version> element of the pom.xml of each module that undergoes updates.

I believe this is not the correct / indicated method. Is there anything automated for this?

asked by anonymous 14.01.2014 / 17:28

1 answer


If all your projects are controlled at the same pom, create a property:

<project ...>

And then use wherever you want as:


Another way to do this automated version closing is by using the maven release plugin ( link ).

In this case, firing mvn release:prepare maven will simulate a version lock for you. This will change the version of the artifacts (everyone with SNAPSHOT, it will ask if you want to do the tag) and commit in SVN.

After prepare is successfully completed, you execute the command mvn release:perform that commits the changes.

This plugin can integrate with SVN and also with JIRA.

If an error occurred, you can use mvn:rollback to undo changes.

More details look at the links below: link link

14.01.2014 / 17:34