Maven Release plugin

Useful commands

	1. Prepare
	mvn release:prepare

	2. Perform release
	mvn release:perform

	3. Update develop version number
	mvn release:update-versions -DdevelopmentVersion={version}

	4. Update version from released source.
	mvn versions:set -DnewVersion=1.0.CR-SNAPSHOT.

	5. Batch release (non interactive)
	mvn -B release:prepare

POM configuration

<scm>
   <developerConnection>
       scm:svn:http://xxx/trunk
   </developerConnection>
</scm>
<distributionManagement>
   <repository>
       <id>ReleaseUniqueId</id>
       <name>UniqueReposityName</name>
       <url>file://///computer/directory/maven_release</url>
    </repository>
</distributionManagement>

<build>
   <pluginManagement>
       <plugins>
           <plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-release-plugin</artifactId>
		<version>2.5.1</version>
		<configuration>
                   <commitByProject>false</commitByProject>
                   <scmCommentPrefix>see #ticket </scmCommentPrefix>
                   <autoVersionSubmodules>true</autoVersionSubmodules>
                   <username>user</username>
                   <password>pass</password>
                   <tagBase>
                       http://xxx/tags
                   </tagBase>
                 </configuration>
             </plugin>
         </plugins>
    </pluginManagement>
</build>
Advertisements
This entry was posted in Java, Programming and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s