title: Unable to retrieve branch name during the RELEASE build using git-commit-id.branch of git-commit-id-plugin
body: <p>I am trying to retreive the branch name from the git repository. I am able to retreive the branch name when I build it in my local and in <strong>Dev</strong> environment. But when the build happens for the second time, where in the version changes from <strong>SNAPSHOT</strong> to <strong>RELEASE</strong>, the branch name is initialized with the pom <strong>versions</strong> of the project. Below is the plugin used</p>
  
  <pre><code>                  &lt;plugin&gt;
                          &lt;groupId&gt;pl.project13.maven&lt;/groupId&gt;
                          &lt;artifactId&gt;git-commit-id-plugin&lt;/artifactId&gt;
                          &lt;version&gt;2.2.2&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;id&gt;git-commit-id&lt;/id&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;revision&lt;/goal&gt;
                                  &lt;/goals&gt;
                                  &lt;phase&gt;validate&lt;/phase&gt;
                                  &lt;configuration&gt;
                                      &lt;dateFormat&gt;EEE MMM dd hh:mm:ss zzz yyyy&lt;/dateFormat&gt;
                                      &lt;prefix&gt;git-commit-id&lt;/prefix&gt;
                                  &lt;/configuration&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
  </code></pre>
  
  <p>And below is the entry in the <strong>properties</strong> file where in the build details are loaded into, during build.</p>
  
  <pre><code>appsVersion=${pom.version}
  appsBuildDateTime=${build-timestamp}
  buildBranch=${git.branch}
  </code></pre>
  
  <p>Now the actual problem is, the <strong>buildBranch</strong> of the properties of file is being set with appsVersion. Thats is.,</p>
  
  <pre><code>     appsVersion=${pom.version}---&gt;17.2.8
       buildBranch=${git.branch}---&gt;is initialized with 17.2.8 instead of BRANCH NAME during 
  RELEASE build.
  </code></pre>
  
  <p>I have also tried other plugins such as <strong>Jgit(maven-jgit-buildnumber-plugin)</strong>, <strong>org.codehaus.mojo(buildnumber-maven-plugin)</strong> but in vain. </p>
  
  <p>Please help me in figuring out what went wrong as we dont have an option to debug at runtime. Any help will be highly appreciated as I am totally stuck with this problem. And I dont want to try other plugins as I have spent considerable amount of time on this issue.</p>