title: maven run maven install from inside pom
body: <p>I have some 3rd party jars that is not in repository that I need to install while doing a build. I am trying to use the ant plugin to copy the generated jar and pom from my projects/lib folder to the local repository </p>
  
  <p>my src/main/lib dir contains following folder structure com/oracle/ojdbc14/10.2/ojdbc.jar, ojdbc.pom</p>
  
  <pre><code>&lt;plugin&gt; 
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; 
              &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt; 
              &lt;version&gt;1.7&lt;/version&gt; 
              &lt;executions&gt; 
                  &lt;execution&gt; 
                      &lt;phase&gt;validate&lt;/phase&gt; 
                      &lt;goals&gt; 
                          &lt;goal&gt;run&lt;/goal&gt; 
                      &lt;/goals&gt; 
                      &lt;configuration&gt; 
                          &lt;tasks&gt; 
                              &lt;copy todir="${settings.localRepository}" &gt;  
                                  &lt;fileset dir="${basedir}/src/main/lib/" includes="**"/&gt;  
                              &lt;/copy&gt;
                          &lt;/tasks&gt; 
                      &lt;/configuration&gt; 
                  &lt;/execution&gt; 
              &lt;/executions&gt; 
          &lt;/plugin&gt; 
  </code></pre>
  
  <p>But when i run mvn install, it fails with the following msg</p>
  
  <pre><code>Failure to find com.oracle:ojdbc14:jar:10.2.0.3.0
  </code></pre>
  
  <p>why does the copy command from ant (validate phase) run before any checks is made regarding dependencies</p>