title: Maven: POM modules and submodules hierarchy
body: <p>My project is structured like this:</p>
  
  <pre><code>.
   |--module
   |  `-- pom.xml
   |  --submodule
   |    `-- pom.xml
   `-- pom.xml
  </code></pre>
  
  <p>The POM's (simplified):</p>
  
  <ul>
  <li>Project:</li>
  </ul>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;project&lt;/artifactId&gt;
      &lt;name&gt;Project&lt;/name&gt;
      &lt;groupId&gt;org.myorg&lt;/groupId&gt;
      &lt;version&gt;1.0.6-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;modules&gt;
          &lt;module&gt;module&lt;/module&gt;     
      &lt;/modules&gt;
      (...)
  &lt;/project&gt;
  </code></pre>
  
  <ul>
  <li>Module:</li>
  </ul>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.myorg&lt;/groupId&gt;
          &lt;artifactId&gt;project&lt;/artifactId&gt;
          &lt;version&gt;1.0.6-SNAPSHOT&lt;/version&gt;
          &lt;relativePath&gt;../pom.xml&lt;/relativePath&gt;
      &lt;/parent&gt;
  
      &lt;artifactId&gt;module&lt;/artifactId&gt;
      &lt;name&gt;Module&lt;/name&gt;
      &lt;groupId&gt;org.myorg&lt;/groupId&gt;
      &lt;version&gt;1.0.6-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;modules&gt;
          &lt;module&gt;submodule&lt;/module&gt;      
      &lt;/modules&gt;
      (...)
  &lt;/project&gt;
  </code></pre>
  
  <ul>
  <li>Submodule:</li>
  </ul>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.myorg&lt;/groupId&gt;
          &lt;artifactId&gt;module&lt;/artifactId&gt;
          &lt;version&gt;1.0.6-SNAPSHOT&lt;/version&gt;
          &lt;relativePath&gt;../pom.xml&lt;/relativePath&gt;
      &lt;/parent&gt;
  
      &lt;artifactId&gt;submodule&lt;/artifactId&gt;
      &lt;name&gt;Submodule&lt;/name&gt;
      &lt;groupId&gt;org.myorg&lt;/groupId&gt;
      &lt;version&gt;1.0.6-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      (...)
  &lt;/project&gt;
  </code></pre>
  
  <p>When run <code>maven install</code> in POM's <em>project</em> or <em>module</em> the project is built sucessfully. But, when run in <em>submodule</em> occours this error:</p>
  
  <p><strong>Failed to execute goal on project submodule: Could not find artifact org.myorg:project:pom:1.0.6-SNAPSHOT</strong></p>
  
  <p>Why my submodule not find the POM <em>project</em>? The relative path is specified.</p>