title: maven antrun copy resources to base target directory
body: <p>I'm learning how to use maven for my standalone java apps but I don't understand how to do a recursive copy of all directories from /src/main/resources to /taget directory.</p>
  
  <p>I tried using antrun and resources plugin, but resources are copied to /target/classes and not to /target.</p>
  
  <p>What is wrong here?</p>
  
  <pre><code>&lt;build&gt;
    &lt;pluginManagement&gt;&lt;plugin&gt;
       &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
       &lt;version&gt;1.4&lt;/version&gt;
       &lt;executions&gt;
        &lt;execution&gt;
         &lt;phase&gt;process-resources&lt;/phase&gt;
         &lt;configuration&gt;
          &lt;tasks&gt;
           &lt;copy todir="${basedir}/target"&gt;
            &lt;fileset dir="${basedir}/src/main/resources" includes="**/*" /&gt;
           &lt;/copy&gt;
          &lt;/tasks&gt;
         &lt;/configuration&gt;
         &lt;goals&gt;
          &lt;goal&gt;run&lt;/goal&gt;
         &lt;/goals&gt;
        &lt;/execution&gt;
       &lt;/executions&gt;
      &lt;/plugin&gt;  &lt;/pluginManagement&gt;
   &lt;/build&gt;
  </code></pre>
  
  <p>Thanks for your help.</p>
  
  <p>EDIT:
  I would copy to /target directories like "bin","logs","conf", so I can test the app. and, with another maven task, package everything (jars and bin/conf/tmp dirs) into a zip/tar.gz file.</p>