title: maven using parent dependencyManagement with ${project.version} causes dependency in wrong version
body: <p>I have the following structure with the following dependency: child1->child2.</p>
  
  <p>and a parent for both which consolidates all versions in dependency management, using <code>${project.version}</code>.</p>
  
  <p>Folder structures:</p>
  
  <pre><code>+ parent
    + child1
    + child2
  </code></pre>
  
  <p>See poms below + complete example <a href="https://www.dropbox.com/sh/522o2v42dmg3l4r/AABJpr1LRBMErgWJrefHHOERa?dl=0" rel="nofollow noreferrer">here</a>.</p>
  
  <p>Everything works find when child2's version is set to <strong>1</strong>.0-SNAPSHOT.</p>
  
  <p>When trying to change <strong>just child2</strong>'s version to <strong>2</strong>.0-SNAPSHOT, I get the following error:</p>
  
  <pre><code>Failure to find ...:child1:jar:2.0-SNAPSHOT
  </code></pre>
  
  <p><strong>Why is maven trying to find version <em>child1</em> 2.0 and not 1.0?</strong></p>
  
  <p>Parent:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;info.fastpace.issue.unknowversion&lt;/groupId&gt;
      &lt;artifactId&gt;parent&lt;/artifactId&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;modules&gt;
          &lt;module&gt;child1&lt;/module&gt;
          &lt;module&gt;child2&lt;/module&gt;
      &lt;/modules&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;info.fastpace.issue.unknowversion&lt;/groupId&gt;
                  &lt;artifactId&gt;child1&lt;/artifactId&gt;
                  &lt;version&gt;${project.version}&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;info.fastpace.issue.unknowversion&lt;/groupId&gt;
                  &lt;artifactId&gt;child2&lt;/artifactId&gt;
                  &lt;version&gt;${project.version}&lt;/version&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Child1:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;artifactId&gt;child1&lt;/artifactId&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;info.fastpace.issue.unknowversion&lt;/groupId&gt;
          &lt;artifactId&gt;parent&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Child2:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;artifactId&gt;child2&lt;/artifactId&gt;
      &lt;version&gt;2.0-SNAPSHOT&lt;/version&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;info.fastpace.issue.unknowversion&lt;/groupId&gt;
          &lt;artifactId&gt;parent&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;info.fastpace.issue.unknowversion&lt;/groupId&gt;
              &lt;artifactId&gt;child1&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>