title: How to change POM version in CI build?
body: <p>I'm probably approaching the problem all wrong, but here goes...</p>
  <p>We want to implement a <code>development</code> -&gt; <code>releases/x.y.z</code> -&gt; <code>master</code> workflow using Gitlab and Nexus. The artifacts should be labelled <code>x.y.z-SNAPSHOT</code>, <code>x.y.z-rc</code> and <code>x.y.z</code> respectively.</p>
  <p>In the <code>ci-build.yml</code>, I have tried to modify the POM depending on the current branch so as to create the correctly labelled artifacts. The problem is obviously that the change will be one commit ahead of the current build commit and the POM used in the build has the original version.</p>
  <p>e.g.</p>
  <ul>
  <li>a release branch is created from development</li>
  <li>the POM has 2.3.4-SNAPSHOT and, during the <code>ci-build</code>, is modified to 2.3.4-rc and is committed and pushed to git</li>
  <li>the subsequent build and deploy actions are executed but this deploys a 2.3.4-SNAPSHOT package to Nexus and not 2.3.4-rc as wanted</li>
  </ul>
  <p>My question here is the following:</p>
  <p><strong>Can I modify the POM and use the updated POM in all following stages of the <code>ci-build</code>?</strong></p>
  <p><em>(I don't feel that this is the correct procedure, but it is what my team-leader has requested so I'm trying to implement it...)</em></p>