title: Changing Maven pom.xml <properties> values physically
body: <p>I'm building a deployment pipeline for a couple of projects that depend on each other. Each build produces a new release build with a unique version number, which is deployed to a Maven repository. The downstream projects in the pipeline are then triggered with that new version as a dependency and built in like manner.</p>
  
  <p>What I need is to change a property value in the pom.xml (or all poms in a multi module project) before building the project. For example in the following code the "0.1.200" would be changed to "0.1.345" (or whatever the latest build number is). Using system properties is not an option, because the updated pom will be deployed in a Maven repository, so the change must be persistent.</p>
  
  <pre><code>&lt;properties&gt;
      &lt;foo.version&gt;0.1.200&lt;/foo.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.example&lt;/groupId&gt;
          &lt;artifactId&gt;foo&lt;/artifactId&gt;
          &lt;version&gt;${foo.version}&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p><strong>Is there some Maven plugin for doing this with one command line instruction?</strong> Else I will need to write a short script (e.g in Ruby) which parses and changes all the pom.xml files in the project.</p>