I'm currently setting up a web project with maven 3.1.1 and maven war plugin 2.4 (http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html). In particular, I'm trying to copy and filter a resource with maven war plugin in a way that I've already done in the past and it worked. Here follows the relevant pom configuration:
WAR plugin configuration
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
...
<webResources>
<resource>
<directory>src/main/webapp/META-INF</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
<targetPath>META-INF</targetPath>
</resource>
...
</configuration>
</plugin>
...
Activated profile definition:
...
<profiles>
<profile>
<id>dummyDev</id>
<build>
<filters>
<filter>filters/development.properties</filter>
</filters>
</build>
</profile>
...
META-INF/context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context reloadable="${tomcat.context.reloadable}">
</Context>
And finally "development.properties":
tomcat.context.reloadable=true
The context.xml gets copied into the WAR, but not filtered. If I try to write directly the property in the profile it works (i.e. without referencing to properties file): it doesn't work only when I reference thep properties file. It seems that there's something wrong in reading the properties file. Moreover, after having "packaged", maven doesn't tell me in the console that the properties file wasn't found (so maven finds the file).
Finally I tried to achieve the work with maven war plugin version 2.1.1 (and version 2.3) and it works: I tried more times just changing the maven war plugin's version so I'm pretty sure that the problem is that.
Am I missing something? Is this a known bug of maven war plugin? Am I trying to reach the result (filtering that file) in the right way? Thanks.