title: Reading Properties file from POM file in Maven
body: <p>Why is this NOT working ? How to pick the version numbers from the properties file.</p>
  
  <p>Reading properties in pom.xml</p>
  
  <pre><code>&lt;project&gt;
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;properties-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.0&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;phase&gt;initialize&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;read-project-properties&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
            &lt;configuration&gt;
              &lt;files&gt;
                &lt;file&gt;dev.properties&lt;/file&gt;
              &lt;/files&gt;
            &lt;/configuration&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>In dev.properties</p>
  
  <p>org.aspectj.aspectjrt.version=1.6.11</p>
  
  <p>Dependency in pom.xml</p>
  
  <pre><code>        &lt;dependency&gt;
              &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
              &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
              &lt;version&gt;${org.aspectj.aspectjrt.version}&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>Error : dependency must be a valid version</p>