title: Jenkins maven-release-plugin
body: <p>In Jenkins (latest), Maven 3.0.x, I have a project (Java source code).</p>
  
  <p>I'm using M2 release plugin, which provides a nice "Perform Maven Release" button on the Jenkins job (left hand side pane on the Jenkins job's dashboard). Behind the scene / in Jenkins job's configuration, it calls: <strong>release:prepare release:perform</strong> goals.</p>
  
  <p>When I'm click on "Perform Maven Release", it does it's job successfully (builds from 1.0.0-SNAPSHOT, run tests &amp;&amp; if successful, make changes to pom.xml and put version as 1.0.0 as version ID, perform some more verification and make changes to pom.xml (what maven-release-plugin checks are etc), commit this change in version control, tag it with 1.0.0 as a "TAG" in version control, change pom.xml again to use 1.0.1-SNAPSHOT and commit it, then checkout from that tagged 1.0.0 release version tag which we just created, checkout it under /target/checkout folder, build relase 1.0.0 artifacts (jar/war/pom etc) and finally deploys it to the repository which you'd have mentioned inside ..... ...  section.</p>
  
  <pre><code>  &lt;distributionManagement&gt;
     &lt;repository&gt;
       &lt;id&gt;dev-artifactory&lt;/id&gt;
           &lt;url&gt;http://1.2.3.15:8081/artifactory/libs-release-local/&lt;/url&gt;
     &lt;/repository&gt;
     &lt;snapshotRepository&gt;
       &lt;id&gt;dev-artifactory&lt;/id&gt;
           &lt;url&gt;http://1.2.3.15:8081/artifactory/libs-snapshot-local/&lt;/url&gt;
     &lt;/snapshotRepository&gt;
    &lt;/distributionManagement&gt;
  </code></pre>
  
  <p><strong>What I need is:</strong></p>
  
  <p>1) How can I make "Perform Maven Release" process to call a deployment to a server once x.x.x release artifacts are generated by the process above and run some Integration tests. This should happen before deployment of artifacts to a binary repository (Artifactory/Nexus) is performed by maven-release-plugin process. i.e. if you are putting artifacts in a release repository, then non-unit tests are also successful (not that artifacts are in libs-release-local repository in Artifactory and Integration tests are yet to be launched.</p>
  
  <p>OR do I need to change  ...  to use libs-snapshot-local (Artifactory repository) and then run IT tests and finally if those tests are successful, move 1.0.0 release artifacts from libs-stage-local repository to libs-release-local repository.</p>
  
  <p>I know I can put maven-release-plugin related settings in Maven's user's .m2/settings.xml (user global) or at M2_HOME/.m2/settings.xml (global) but at this point, that's not the question.</p>