title: Maven friendly CI - revision property doesn't work with Jenkins build
body: <p>I'm trying to use <a href="https://maven.apache.org/maven-ci-friendly.html" rel="nofollow noreferrer">maven friendly ci</a> for my multi-module project. My project has three levels of parent child hierarchy, i.e., my parent project has few child projects and those child projects has many other child projects within them.</p>
  <p>I have added a sample of my pom files below. My parent pom has a flatten plugin as well, everything works fine in my local machine. But when I build it from Jenkins, it doesn't work. And I get the below error</p>
  <p>Error</p>
  <blockquote>
  <p>[ERROR] [ERROR] Some problems were encountered while processing the
  POMs: [FATAL] Non-resolvable parent POM for
  com.faskan:child-module:[unknown-version]:
  Could not transfer artifact
  com.faskan:parent-module:pom:${revision} from/to nexus</p>
  </blockquote>
  <p>Parent project's pom.xml</p>
  <pre><code>&lt;project xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.faskan&lt;/groupId&gt;
          &lt;artifactId&gt;global-parent-dependency&lt;/artifactId&gt;
          &lt;version&gt;1.1.0&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;groupId&gt;org.faskan&lt;/groupId&gt;
      &lt;artifactId&gt;parent-module&lt;/artifactId&gt;
      &lt;version&gt;${revision}&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;name&gt;project parent pom&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;revision&gt;21.15.0-SNAPSHOT&lt;/revision&gt;
      &lt;/properties&gt;
  
     &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;flatten-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.2.2&lt;/version&gt;
              &lt;configuration&gt;                
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;!-- enable flattening --&gt;
                  &lt;execution&gt;
                      &lt;id&gt;flatten&lt;/id&gt;
                      &lt;phase&gt;process-resources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;flatten&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
                  &lt;!-- ensure proper cleanup --&gt;
                  &lt;execution&gt;
                      &lt;id&gt;flatten.clean&lt;/id&gt;
                      &lt;phase&gt;clean&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;clean&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  
  ...
  &lt;/project&gt;
  </code></pre>
  <p>Child project's pom.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;child-module&lt;/artifactId&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.faskan&lt;/groupId&gt;
          &lt;artifactId&gt;parent-module&lt;/artifactId&gt;
          &lt;version&gt;${revision}&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;name&gt;child admin&lt;/name&gt;
  
      &lt;packaging&gt;jar&lt;/packaging&gt;
  ..
  &lt;/project&gt;
  </code></pre>
  <p>Child of child project (grand child)</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;artifactId&gt;grand-child-module&lt;/artifactId&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;child of child module&lt;/name&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.faskan&lt;/groupId&gt;
          &lt;artifactId&gt;child-module&lt;/artifactId&gt;
          &lt;version&gt;${revision}&lt;/version&gt;
      &lt;/parent&gt;
  ..
  &lt;/project&gt;
  </code></pre>
  <p>I found a similar question <a href="https://stackoverflow.com/questions/58608128/how-do-you-get-maven-child-projects-to-build-in-jenkins-when-using-ci-friendly-v">How do you get maven child projects to build in Jenkins when using CI Friendly versions?</a>. Not sure if mine is the same because I don't get any parse failure errors.</p>