title: How to use properties-maven-plugin?
body: <p>I'd like to use properties-maven-plugin. I read the usage <a href="http://mojohaus.org/properties-maven-plugin/usage.html" rel="noreferrer">http://mojohaus.org/properties-maven-plugin/usage.html</a> , but it's not working for me.</p>
  
  <p>I created a very simple project to test it. Here is my pom.xml:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;test&lt;/groupId&gt;
    &lt;artifactId&gt;MavenTest&lt;/artifactId&gt;
    &lt;version&gt;1.0.0&lt;/version&gt;
    &lt;name&gt;MavenTest&lt;/name&gt;
  
    &lt;properties&gt;
      &lt;prop1&gt;2.2&lt;/prop1&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;
              &lt;version&gt;${log4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
              &lt;version&gt;${log4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
    &lt;/dependencies&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-alpha-2&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;configuration&gt;
                              &lt;files&gt;
                                  &lt;file&gt;${basedir}/my.properties&lt;/file&gt;
                              &lt;/files&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                  &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                  &lt;version&gt;1.0.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;lifecycleMappingMetadata&gt;
                          &lt;pluginExecutions&gt;
                              &lt;pluginExecution&gt;
                                  &lt;pluginExecutionFilter&gt;
                                      &lt;groupId&gt;
                                          org.codehaus.mojo
                                      &lt;/groupId&gt;
                                      &lt;artifactId&gt;
                                          properties-maven-plugin
                                      &lt;/artifactId&gt;
                                      &lt;versionRange&gt;
                                          [1.0-alpha-2,)
                                      &lt;/versionRange&gt;
                                      &lt;goals&gt;
                                          &lt;goal&gt;
                                              read-project-properties
                                          &lt;/goal&gt;
                                      &lt;/goals&gt;
                                  &lt;/pluginExecutionFilter&gt;
                                  &lt;action&gt;
                                      &lt;ignore&gt;&lt;/ignore&gt;
                                  &lt;/action&gt;
                              &lt;/pluginExecution&gt;
                          &lt;/pluginExecutions&gt;
                      &lt;/lifecycleMappingMetadata&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>If I run mvn compile, or mvn install the result is:</p>
  
  <pre><code>[ERROR] The build could not read 1 project -&gt; [Help 1]
  org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
  [ERROR] 'dependencies.dependency.version' for org.apache.logging.log4j:log4j-api:jar must be a valid version but is   '${log4j.version}'. @ line 16, column 13
  </code></pre>
  
  <p>The "my.properties" file contains this:</p>
  
  <pre><code> log4j.version=2.2    
  </code></pre>
  
  <p>As it described here: <a href="http://mojohaus.org/properties-maven-plugin/index.html" rel="noreferrer">mojohaus</a></p>
  
  <p>If I use the prop1 property, which is defined in the pom.xml, everything is working.</p>
  
  <p>So what I'm doing wrong?  </p>