Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] webresource filtering with wtp

If you just added this config to the war plugin, you need to make sure the maven configuration is updated (right click on project > maven > update project configuration)

You should see a couple things happening :
* the Web Resources node in the project explorer should contain a new child : webresources, containing all the filtered resources : http://img848.imageshack.us/f/resourcefiltering.jpg/
* if you open the web project/.settings/ you should see the webresources folder is deployed before src/main/webapp :
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="webapp">
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
        <wb-resource deploy-path="/" source-path="/target/m2eclipse-wtp/webresources"/>
        <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
        <property name="context-root" value="webapp"/>
        <property name="java-output-path" value="/webapp/target/classes"/>
    </wb-module>
</project-modules>

Filtering is triggered on workspace modifications.
You can try to clean the project or make a modification to one of the files to be filtered and see if the filtered folder is updated.

If you can't make it work, please attach a sample project and steps to reproduce the issue to https://issues.sonatype.org/browse/MECLIPSEWTP-22

regards,

Fred Bricon

2011/3/24 Derek Lewis <derek@xxxxxxxxxx>
Is this the right place to be posting about the m2eclipse-wtp plugin?

I notice there was a post back on Jan 26th about a fix for webresource
filtering with m2eclipse-wtp:
http://dev.eclipse.org/mhonarc/lists/m2e-dev/msg00204.html  Has this
been pushed out to the 0.13.x branch?  I'm trying to get that working
with the latest m2e nightly and a m2e-wtp 0.13.x build from yesterday,
but while it's working with maven on the command line, in Eclipse with
wtp it's not filtering the webresource files.  Is there additional
configuration required in the pom to get the m2e-wtp plugin to do the
filtering?

My pom.xml has the following:
        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-war-plugin</artifactId>
           <configuration>
             <webResources>
               <resource>
                 <filtering>true</filtering>
                 <directory>src/main/webapp</directory>
               </resource>
             </webResources>
           </configuration>
         </plugin>
Which is copying src/main/webapp/META-INF/context.xml.
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev



--
"Have you tried turning it off and on again" - The IT Crowd

Back to the top