How to build a release in MVN in Linux

Navigate to project location where you should see pom.xml, assume source code is in SVN.
Step#1
$svn update –username=<username>

Step#2
$mvn clean

Step#3
$mvn release:clean

Step#4 (This is an optional step)
$mvn -Ddry-run=true release:prepare -DscmCommentPrefix=”provide release information”

Step#5
<Now Do the proper prepare>
$mvn release:prepare -DscmCommentPrefix=”provide release information”

First input: You need to provide release version: 1.0 <hit enter>

Second input for development version: 1.1 <hit enter>

Step#6
Then Perform the release.
$mvn release:perform

How to Create a branch for this release:
$mvn -DbranchName=<Branch_Name> -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false release:branch -DscmCommentPrefix=”provide branch information”

Leave a Reply