title: How to release specific branch with Jenkins
body: <p>I'm having a Jenkins with the M2 release plugin.
  I have a job for building AND releasing.</p>
  
  <p>The used repository has master and feature/bugfix branches.
  The job is configured to build all branches. The master branch is deployed in addition.
  All stable changes are merged into master branch but the latest changes (not working yet) are made in a bugfix branch. Therefore the latest build (mvn install) is made on this bugfix branch.</p>
  
  <p>If I want to release this project jenkins takes the latest built revision (the bugfix branch) and tries to release this. Due to SNAPSHOT dependencies this is failing.</p>
  
  <p>I could of course set the "branch to build" to "master" when releasing. But a) I would need to reset this after release and b) this would be necessary everytime i want to release.</p>
  
  <p>I also could make this build parameterized with branch options but then this job will not be executed by scm commits.</p>
  
  <p>So my question is: Is there a way/plugin to tell jenkins to release a specific branch?</p>
  
  <p><strong>EDIT:</strong>
  I added my pom.xml so you might be able to provide an easy to understand example</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;my.parent.gid&lt;/groupId&gt;
      &lt;artifactId&gt;my.iarent.aid&lt;/artifactId&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;name&gt;Project Name&lt;/name&gt;
  
  &lt;groupId&gt;my.project.gid&lt;/groupId&gt;
  &lt;artifactId&gt;my.project.aid&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  
  &lt;url&gt;${project_url}&lt;/url&gt;
  
  &lt;ciManagement&gt;
      &lt;system&gt;${project_ciManagement.system}&lt;/system&gt;
      &lt;url&gt;${project_ciManagement.url}&lt;/url&gt;
  &lt;/ciManagement&gt;
  
  &lt;scm&gt;
      &lt;!-- read access --&gt;
      &lt;connection&gt;${project_scm.connection}&lt;/connection&gt;
      &lt;!-- write access (release-plugin) --&gt;
      &lt;developerConnection&gt;${project_scm.developerConnection}&lt;/developerConnection&gt;
      &lt;!-- browser access --&gt;
      &lt;url&gt;${project_scm.url}&lt;/url&gt;
      &lt;tag&gt;HEAD&lt;/tag&gt;
  &lt;/scm&gt;
  
  &lt;properties&gt;
      &lt;compiler.javaVersion&gt;1.7&lt;/compiler.javaVersion&gt;
      &lt;scm.repo&gt;repo_name&lt;/scm.repo&gt;
  &lt;/properties&gt;
  
  &lt;modules&gt;
      &lt;module&gt;Module1&lt;/module&gt;
      &lt;module&gt;Module2&lt;/module&gt;
      &lt;module&gt;Module3&lt;/module&gt;
  &lt;/modules&gt;
  </code></pre>
  
  <p></p>