title: How should I update the version inside my pom.xml when releasing using git flow?
body: <p>In maven projects the version of a project is contained in the <code>&lt;version&gt;</code> attritbute of the pom.xml file. When creating a new release in the git flow model I need to bumb the version number. <a href="http://nvie.com/posts/a-successful-git-branching-model/#release-branches" rel="noreferrer">This article</a> explains how this is done (without maven):</p>
  
  <ol>
  <li>Create a release branch</li>
  <li>Change the version number and commit</li>
  <li>Merge the release branch both to develop and master</li>
  </ol>
  
  <p>Additionally it says:</p>
  
  <blockquote>
    <p>It is exactly at the start of a release branch that the upcoming release gets assigned a version number—not any earlier. Up until that moment, the develop branch reflected changes for the “next release”, but it is unclear whether that “next release” will eventually become 0.3 or 1.0, until the release branch is started. That decision is made on the start of the release branch and is carried out by the project’s rules on version number bumping.</p>
  </blockquote>
  
  <p>I see two problems in conjunction with maven here:</p>
  
  <ol>
  <li>The version under development in maven would be [next version]-SNAPSHOT. So we cannot really postpone the decision which version is next up to the moment we create a release branch. Of course if we can change our mind later, but we already need to enter /some value/ here earlier.</li>
  <li>Before creating our release the version in the pom.xml was let's say <code>1.1-SNAPSHOT</code>. Now we have changed that to simply <code>1.1</code> on the release branch and merged that to master. Fine. But we should also merge that branch back to develop and for that we need to adapt the version to e.g. <code>1.2-SNAPSHOT</code>. And probably we should not have done that on the release branch because that commit should not be part of the release. Actually we probably should have made this change right after branching off develop because all future commits on develop will be for the next version.</li>
  </ol>
  
  <p>When googling for the problem I found some articles about maven-plugins that can automate the process, which may be interesting, but this question is really on how the git graph should look like and where the version bump commits should be and not how I can automate this using a maven-plugin.</p>