If you want to use different property values for configuration files like web.xml or struts.xml in each profiling (test,development,production) you can handle this action with using maven profile properties.
Let’s say you have some context param information in web.xml:
<context-param>
<param-name>strutsPath</param-name>
<param-value>${struts.path}</param-value>
</context-param>
You can change ${struts.path} variable in pom.xml file of the maven configuration.
First you need to and filtering option in the builder which you used.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warSourceExcludes>
**/.svn/**
</warSourceExcludes>
<webResources>
<webResource>
<directory>/src/main/webapp/WEB-INF</directory>
<includes>
<include>web.xml</include>
</includes>
<filtering>true</filtering>
<targetPath>WEB-INF</targetPath>
</webResource>
</webResources>
</configuration>
</plugin>
You should use standard maven output directory for property-substitued web.xml file <targetPath>;
Last thing to do is give a filter property file to define ${struts.path} variable in the profile section of the pom.xml
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/profiles/dev</directory>
</resource>
</resources>
<filters>
<filter>${basedir}/src/main/profiles/dev/filter.properties</filter>
</filters>
</build>
</profile>
filter.properties should contain property like struts.path : /src/main/profile/struts.properties;