title: Maven: Where to put generated resources for tomcat-maven-plugin?
body: <p>I have CSS and JavaScript files in <code>src/main/webapp</code> directory of my project.
  I want to join add joined and minified version of these resources to my WAR file and to the place where <code>tomcat-maven-plugin</code> picks it up.</p>
  
  <p>I used yuicompressor-maven-plugin to create the files and put it to <code>${project.build.directory}/${project.build.finalName}</code>. It works great for maven package and those resources make their way to WAR file, but somehow <code>tomcat-maven-plugin</code> does not see those at all. Should I use a different directory for it?</p>
  
  <p>My pom:</p>
  
  <pre><code>    &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;tomcat-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;path&gt;/MyApp&lt;/path&gt;
                  &lt;warDirectory&gt;${project.build.directory}/${project.build.finalName}&lt;/warDirectory&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;version&gt;2.5.1&lt;/version&gt;
              &lt;inherited&gt;true&lt;/inherited&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
                  &lt;optimize&gt;true&lt;/optimize&gt;
                  &lt;debug&gt;true&lt;/debug&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.5&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;encoding&gt;UTF-8&lt;/encoding&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;webResources&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;${basedir}/src/main/resources/META-INF&lt;/directory&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                          &lt;targetPath&gt;META-INF&lt;/targetPath&gt;
                          &lt;includes&gt;
                              &lt;include&gt;context.xml&lt;/include&gt;
                          &lt;/includes&gt;
                      &lt;/resource&gt;
                  &lt;/webResources&gt;
                  &lt;archive&gt;
                      &lt;addMavenDescriptor&gt;false&lt;/addMavenDescriptor&gt;
                      &lt;manifest&gt;
                          &lt;addDefaultImplementationEntries&gt;true&lt;/addDefaultImplementationEntries&gt;
                          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                      &lt;/manifest&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;net.alchim31.maven&lt;/groupId&gt;
              &lt;artifactId&gt;yuicompressor-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.3.0&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;process-resources&lt;/phase&gt;
                      &lt;configuration&gt;
                          &lt;excludes&gt;
                              &lt;exclude&gt;**/*&lt;/exclude&gt;
                          &lt;/excludes&gt;
                          &lt;aggregations&gt;
                              &lt;aggregation&gt;
                                  &lt;output&gt;${project.build.directory}/${project.build.finalName}/js/commons-pack.js&lt;/output&gt;
                                  &lt;includes&gt;
                                      &lt;include&gt;${project.build.sourceDirectory}/../webapp/js1.js&lt;/include&gt;
                                      &lt;include&gt;${project.build.sourceDirectory}/../webapp/js2.js&lt;/include&gt;
                       ...
  </code></pre>
  
  <p>What should I do to make  <code>mvn tomcat:run</code> to also pick up my generated files?</p>