[ACCEPTED]-Maven release properties-release

Accepted answer
Score: 11
mvn -B release:prepare release:perform

-B is for batch mode, it will use the defaults 13 it offers when in non-batch mode. Generally 12 for X.Y.Z-SNAPSHOT, it does a release of 11 X.Y.Z and sets the new snapshot to X.Y.(Z+1)-SNAPSHOT.

As 10 with all things maven, you can fight this 9 naming convention and have lots of headaches, or 8 give in and decide your versions and labels 7 are going to be the maven way and get lots 6 for free. I fought it, and lost. Just 5 one of the many ways that you have to give 4 over completely to maven if you're going 3 to use it.

I'm perfectly happy having done 2 so, wanting to impose my own schemes usually 1 isn't a good idea anyway.

Score: 2

Partial answer, after your comment:

To change the 5 tag name, use the -Dtag=xxx argument to release:prepare. See the release:prepare documentation for 4 details.

Untested code warning

To do this in a fully automated 3 way, you need to add a configuration entry 2 to your pom.xml where you would set the 1 tag name:

Score: 1

The way i have done it is Performing a Non-interactive Release Using a properties file.

You create a 9 release.properties in the root of the aggregator 8 project (the one that has packaging:pom) and 7 for each project you add two properties 6 of the following form:


if you want to use 5 a particular literal for your tag you add 4 the following property


The following is an 3 example where both things are done (specify 2 the version of each module and defined the 1 literal to be used to tag in the SCM):


More Related questions