title: Maven POM dependency management with submodules
body: <p>I've got these two pom files:</p>
  
  <p>1) Parent pom.xml</p>
  
  <p>...</p>
  
  <pre><code>&lt;modules&gt;
      &lt;module&gt;web-module&lt;/module&gt;
      &lt;module&gt;interface-module&lt;/module&gt;
  &lt;/modules&gt;
  &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;${project.groupId}.${project.artifactId}&lt;/groupId&gt;
              &lt;artifactId&gt;interface-module&lt;/artifactId&gt;
              &lt;version&gt;${project.version}&lt;/version&gt;
              &lt;type&gt;ejb&lt;/type&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
   &lt;/dependencyManagement&gt;
  </code></pre>
  
  <p>2) Child pom.xml</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;${project.parent.groupId}.${project.parent.artifactId}&lt;/groupId&gt;
          &lt;artifactId&gt;interface-module&lt;/artifactId&gt;
          &lt;version&gt;${project.version}&lt;/version&gt;
          &lt;type&gt;ejb&lt;/type&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>The question is:</p>
  
  <p>Why it can't resolve the dependency being managed by parent dependencyManagment with version omitted in the Child? Why do I have to specify the version while using dependencyManagment for submodule that is inherited from the Parent that is aggregating these modules?
  Maybe some advice?</p>
  
  <p>UPD:
  Turned out that this behavior exists when groupId of the Child is changed and is not the one that is inherited from the Parent...
  Basically I have 2 submodules of the Parent one and they both are children of the Parent one.
  When I change the groupId in the Child module then it asks me to specify the version during dependency management which is kinda strange.
  Any ideas why maven is acting like that?</p>