You can use the maven-release-plugin to release your artifacts. Then automatically all of your versions will be incremented using the release plugin. An exception may be if you go from 1.0.3-SNAPSHOT to 1.1.0-SNAPSHOT. Development timeline with Maven:
1.0.0-SNAPSHOT 1.0.0 1.0.1-SNAPSHOT 1.0.1 1.0.2-SNAPSHOT 1.0.2 ..
To go from SNAPSHOT to the release version, you must use the maven release plugin, you can release the artifact simply by using:
First step:
mvn release:prepare
Last step:
mvn release:perform
If you want to accept the defaults, you can simply add -B as:
mvn -B release:prepare
or you can combine these steps into one:
mvn -B release:prepare release:perform
The above can also be used from solution CI.
Using mvn install is only for installing artifacts into your local repository. If you work with a real one, as a storage manager (which I can recommend), you should use:
mvn deploy
One of the requirements for using the release plugin is to configure the scm area in your pom (hope you use a version control?).
khmarbaise Mar 04 '12 at 12:12 2012-03-04 12:12
source share