title: How to make maven build take version from constant
body: <p>I have a multi module project. I have introduced a property <code>app.version</code> which I use instead of version everywhere in the pom.xml: in version tag and in dependencies in modules part.</p>
  
  <p>I use maven 3.1.1 in Hudson environment.</p>
  
  <p>After substituting written values (1.6.0-SNAPSHOT) with <code>${app.version}</code>, the build order that really goes through without error, is gone.</p>
  
  <p>What caused the issue?</p>
  
  <p>I got these kind of warnings in the begin, may it affect?</p>
  
  <pre><code>[WARNING] Some problems were encountered while building the effective model     for com.mycompany.project:project-module:jar:2.4.0
  [WARNING] 'version' contains an expression but should be a constant. @ com.mycompany.project:project-module:${app.version}, /var/lib/hudson/jobs/myJob TRUNK Maven/workspace/project-module/pom.xml, line 20, column 11
  </code></pre>
  
  <p>I would need to parse too much the pom.xml:s, so the hierarchy is like follows, I give it:</p>
  
  <pre><code>main_pom
    |
     --- modules
    |      |
    |       --- all other modules
     --- test        |
                       module A
                     |   |
                     |    module B
                       module C
  </code></pre>
  
  <p>I give for hudson to start from main_pom. It handles main_pom as last. Why?
  It starts now from random one in all other modules part, builds the others, then modules, test and main_pom. Why this insane order?</p>
  
  <p>The fail is in module A. It builds that first and not module B.</p>
  
  <p>Correct order would be to start from main_pom -> module B -> module A etc but it starts directly from module A.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>My pom.xmls have the following structure:</p>
  
  <pre><code> &lt;parent&gt;
      &lt;groupId&gt;com.mycompany.project&lt;/groupId&gt;
      &lt;artifactId&gt;modules or parent_pom&lt;/artifactId&gt;
      &lt;version&gt;${app.version}&lt;/version&gt;
      &lt;relativePath&gt;../modules or parent_pom&lt;/relativePath&gt;
   &lt;/parent&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;com.mycompany.project&lt;/groupId&gt;
      &lt;artifactId&gt;some other module&lt;/artifactId&gt;
      &lt;version&gt;${app.version}&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>