Saturday, May 15, 2010

maven release plugin

mvn release:prepare

Preparing a release goes through the following release phases:
  • Check that there are no uncommitted changes in the sources
  • Check that there are no SNAPSHOT dependencies
  • Change the version in the POMs from x-SNAPSHOT to a new version (you will be prompted for the versions to use)
  • Transform the SCM information in the POM to include the final destination of the tag
  • Run the project tests against the modified POMs to confirm everything is in working order
  • Commit the modified POMs
  • Tag the code in the SCM with a version name (this will be prompted for)
  • Bump the version in the POMs to a new value y-SNAPSHOT (these values will also be prompted for)
  • Commit the modified POMs

scm URL will be taken from <scm> or <meta http-equiv="content-type" content="text/html; charset=utf-8">-DconnectionUrl<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: Verdana,Helvetica,Arial,sans-serif; font-size: 16px;"></span></span>
<b>mvn release:</b><b>perform</b>

Performing a release runs the following release phases:
  • Checkout from an SCM URL with optional tag
  • Run the predefined Maven goals to release the project (by default, deploy site-deploy
Non-interactive

mvn --batch-mode -<i>Dtag</i>=my-proj-1.2 <b>release:prepare</b> \<br />                 -<i>DreleaseVersion</i>=1.2 \<br />                 -<i>DdevelopmentVersion</i>=2.0-SNAPSHOT
** There properties can be inside release.properties file

Cleaning

mvn release:clean - for cleaning resourced created by prepare
mvn release:rollback - for half done

Additional goals and release goals

<configuration>  <preparationGoals>clean install verify</preparationGoals>  <goals>deploy</goals><br /></configuration>

update version of all projects


mvn release:<i><b>update-versions</b></i> -DautoVersionSubmodules=true


No comments:

Post a Comment