title: Maven does not replace a variable in 'settings.xml' when it is invoked
body: <p>I have defined a local mirror for all repositories in the settings.xml file:</p>
  
  <pre><code>&lt;mirror&gt;
    &lt;id&gt;myMirror&lt;/id&gt;
    &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
    &lt;url&gt;file://${mypath}/maven/.m2/repository&lt;/url&gt;
  &lt;/mirror&gt;
  </code></pre>
  
  <p>I want that my mirror to point to a local path, in this case the path is:</p>
  
  <pre><code>file://${mypath}/maven/.m2/repository
  </code></pre>
  
  <p>Where ${mypath} is a variable that I pass when I invoke Maven:</p>
  
  <pre><code> mvn -Dmypath="/D:/test" package
  </code></pre>
  
  <p>The problem is that Maven does not replace the variable when it is invoked. I can see that this error is happening by inspection of the build log. For example, Maven reports that it is downloading a file from file://${mypath}/maven/.m2/repository when the correct would be file:///D:/test/maven/.m2/repository.</p>
  
  <p>I have also noted that Maven replaces correctly my variable when it is inserted in the url child tag of the repository tag:</p>
  
  <pre><code>&lt;repository&gt;
          &lt;id&gt;central&lt;/id&gt;
          &lt;url&gt;http://${mypath}/maven/.m2/repository&lt;/url&gt;
  &lt;/repository&gt;
  </code></pre>
  
  <p>The build works correctly when I replace the variable in my settings.xml by the complete URL like in the example below: </p>
  
  <pre><code>&lt;mirror&gt;
          &lt;id&gt;myMirror&lt;/id&gt;
          &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
          &lt;url&gt;file:///D:test/maven/.m2/repository&lt;/url&gt;
  &lt;/mirror&gt;
  </code></pre>