title: How do I make the compile of one maven 3 project depend on the install of another?
body: <p>I have a directory with a pom.xml and several subdirectories with their own pom.xml files</p>
  
  <p>One subdirectory is local called thirdparty. It contains several jar files and installs them to the local maven repo when a <code>mvn install</code> is executed. These are needed by the <code>mvn compile</code> phase of the other artifacts. The root pom.xml simply executes the same step on each child pom.xml.</p>
  
  <p>I'd like to modify the root pom.xml so that mvn compile will do an install on the third party folder before executing the other folders. I tried this in the maven-compiler-plugin:</p>
  
  <pre><code>&lt;executions&gt;
      &lt;execution&gt;
          &lt;id&gt;thirdparty&lt;/id&gt;
          &lt;phase&gt;install&lt;/phase&gt;
      &lt;/execution&gt;
  &lt;/executions&gt;
  </code></pre>
  
  <p>I see nothing in the documentation about specifying a phase in a dependency element.</p>