title: How to run an ant target from Maven2?
body: <p>How do i run a specific target with the antrun-plugin from the command line?</p>
  
  <p><code>mvn antrun:run</code> doesn't make it run.</p>
  
  <hr>
  
  <pre><code>&lt;project&gt;
      ...
      &lt;build&gt;
          &lt;plugins&gt;
              ...
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;myExecution&lt;/id&gt;
                          &lt;phase&gt;deploy&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;run&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;tasks&gt;
                                  &lt;ant target="myTarget" inheritRefs="true"&gt;
                                      ...
                                  &lt;/ant&gt;
                              &lt;/tasks&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
  
                  &lt;dependencies&gt;
                      ...
                  &lt;/dependencies&gt;
              &lt;/plugin&gt;
              ...
          &lt;/plugins&gt;
          ...
      &lt;/build&gt;
      ...
  &lt;/project&gt;
  </code></pre>