title: Building the WAR with m2eclipse in combination with WTP (handling webResources)
body: <p>I have a situation where I have a web application that is built using maven (i.e., maven-war-plugin). For each code modification, we have had to manually launch maven and restart the application server. Now, to reduce build cycle overhead, I want to use WTP to publish the webapp.</p>
  
  <p>Now, we have resource processing with Maven, and there are some additional Maven tasks defined in our POM when building the webapp. Therefore m2eclipse seems like a natural solution.</p>
  
  <p>I have gotten far enough that the Maven builder is running these tasks and filtering resources correctly. However, when I choose "Run on Server", the WAR file does not look like it would if I built it in Maven.</p>
  
  <p>I am <em>guessing</em> that this is because WTP actually builds the WAR, and not the m2eclipse builder. So even though we have configured the maven-war-plugin in our POM, those settings are not used.</p>
  
  <p>Below is a snippet with our maven-war-plugin configuration. What is configured under "webResources" is not picked up, it appears:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
  &lt;version&gt;2.1-alpha-2&lt;/version&gt;
  &lt;configuration&gt;
   &lt;outputDirectory&gt;${project.build.directory}&lt;/outputDirectory&gt;
   &lt;workDirectory&gt;${project.build.directory}/work&lt;/workDirectory&gt;
   &lt;webappDirectory&gt;${project.build.webappDirectory}&lt;/webappDirectory&gt;
   &lt;cacheFile&gt;${project.build.webappDirectory}/webapp-cache.xml&lt;/cacheFile&gt;
   &lt;filteringDeploymentDescriptors&gt;true&lt;/filteringDeploymentDescriptors&gt;
   &lt;nonFilteredFileExtensions&gt;
    &lt;nonFilteredFileExtension&gt;pdf&lt;/nonFilteredFileExtension&gt;
    &lt;nonFilteredFileExtension&gt;png&lt;/nonFilteredFileExtension&gt;
    &lt;nonFilteredFileExtension&gt;gif&lt;/nonFilteredFileExtension&gt;
    &lt;nonFilteredFileExtension&gt;jsp&lt;/nonFilteredFileExtension&gt;
   &lt;/nonFilteredFileExtensions&gt;
   &lt;webResources&gt;
   &lt;!-- Add generated WSDL:s and XSD:s for the web service api. --&gt;
     &lt;resource&gt;
     &lt;directory&gt;${project.build.directory}/jaxws/wsgen/wsdl&lt;/directory&gt;
     &lt;targetPath&gt;WEB-INF/wsdl&lt;/targetPath&gt;
     &lt;filtering&gt;false&lt;/filtering&gt; 
     &lt;includes&gt;
       &lt;include&gt;**/*&lt;/include&gt;
     &lt;/includes&gt;
   &lt;/resource&gt;               
   &lt;/webResources&gt;
   &lt;/configuration&gt;
  </code></pre>
  
  <p>Do I need to reconfigure these resources to be handled elsewhere, or is there a better solution?</p>