title: Publishing POMs via Maven and inserting build version info
body: <p>I'm building Maven projects via TeamCity/Git and trying to insert the TeamCity build numbers in the pom.xml that gets published to my repository upon a successful build. Unfortunately I can't determine how to publish a pom.xml with the substitutions inserted.</p>
  
  <p>My pom.xml contains info like:</p>
  
  <pre><code>&lt;version&gt;${build.number}&lt;/version&gt;
  </code></pre>
  
  <p>where build.number is provided by TeamCity. That all <em>builds</em> ok, and if (say) build.number = 0.1, then the deployment is a <code>pom.xml</code> to a directory with 0.1. All well and good. </p>
  
  <p>However, the pom.xml that is deployed is the <code>pom.xml</code> <em>without</em> the substitutions made. i.e. Maven is running with a <code>pom.xml</code> with appropriate substitutions, but deploys the initial version and so I get</p>
  
  <pre><code>&lt;version&gt;${build.number}&lt;/version&gt;
  </code></pre>
  
  <p>in the final <code>pom.xml</code>. How can I get the build version number in the <code>pom.xml</code> ?</p>