I have a problem with maven. i'm alredy using tomcat7-maven-plugin to deploy my war into a tomcat and it works great.
But now I would like to change a file into my generated war before to send it to servlet container. Is it possible? Particularly I want to change default web.xml with another one.
I've already tried a maven-resources-plugin as showed below:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.2</version>
<executions>
<execution>
<id>default-copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<overwrite>true</overwrite>
<outputDirectory>${project.build.directory}/${project.artifactId}/WEB-INF/</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/webapp/ext/WEB-INF</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
but this plugin replace web.xml just on target WEB-INF folder, nothing will be changed into war file. Someone can help me to find the right plugin to achive my purpose?
UPDATE:
I resolved using this: https://stackoverflow.com/a/3298876/2148530