Connor,

 I don't think it would work with the current builder.
The problem is that right now builder only handle resources that are going into the classpath, e.g. src/main/resources, i.e. resources specified in pom.xml in /project/build/resources element So, your ${basedir}/src/main/webapp-filtered folder need to be copied in a different place, which is specific to the maven-war-plugin and war packaging. More over, copying of such resources to the proper place at deployment time is done by WTP, so it require corresponding configuration. I've updated wiki page for WTP integration with details on supported Maven plugin configuration parameters. See http://docs.codehaus.org/display/M2ECLIPSE/Integration+with+WTP

All in all I would suggest to submit new jira issue and provide sample project that would allow us to reproduce and test this scenario.

In a mean time you could try to add war:exploded goal to the goals invoked on bull build, then edit <project>\.settings\org.eclipse.wst.common.component file and replace

 <wb-resource deploy-path="/" source-path="/src/main/webapp"/>

 with your filtered resources like:

<wb-resource deploy-path="/" source-path="<destination folder where filtered resources are copied>"/>

Note that such changes will be overwritten when you run "Maven / Update project configuration" action.

 regards,
 Eugene


Connor Barry wrote:
Hello, has anyone successfully used filtered web resources with m2eclipse / wtp? I'm talking about having this config in the POM:

<build>
   <plugins>
       <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-war-plugin</artifactId>
           <configuration>
               <webResources>
                   <resource>
                       <filtering>true</filtering>
<directory>${basedir}/src/main/webapp-filtered</directory>
                   </resource>
...

Previous to using m2eclipse, I used to have to run "maven package" manually, then refresh my Eclipse project and restart the WTP server, which picked up the new filtered files. I'm envisioning m2eclipse monitoring my files and copying/filtering to the war folder automatically, so all I'd need to do would be to bounce the WTP server.

On a related note, I thought about adding the goal "war:exploded" to the "goals to invoke on resource changes" maven project property (process-resources is there now). What does it consider a "resource change" - anything in src/main/resources?

Connor


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to