I'm trying to filter a Spring configuration file using Maven filtering. My POM is configured like this:
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<webResources>
<resource>
<filtering>true</filtering>
<targetPath>WEB-INF/context</targetPath>
<directory>src/main/webapp/WEB-INF/context</directory>
<includes>
<include>applicationContext.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
...
and
<profiles>
<profile>
<id>desarrollo</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<filters>
<filter>src/main/properties/dev.properties</filter>
</filters>
</build>
</profile>
<profile>
<id>pruebas</id>
<build>
<filters>
<filter>src/main/properties/test.properties</filter>
</filters>
</build>
</profile>
...
It works great when invoking Maven directly.
Unfortunately, when hot-deploying the webapp in Tomcat 6 with Eclipse WTP and m2e it always picks the unfiltered version of applicationContext.xml. (The file applicationContext.xml in the folder target/m2e-wtp/web-resources/WEB-INF/context is never filtered)
I can't find any useful documentation on the subject. I'm not even sure if it is implemented in m2e.
Is something wrong with my configuration or this is an unimplemented feature?