I have to create test war and production war, which will have a different log4j.properties file in the WEB-INF directory. I have these files
The alternative way is to use maven-antrun-plugin
org.apache.maven.plugins
maven-antrun-plugin
1.7
validate
run
build.env: ${build.env}
Assume resource files are in following structure:
src/
env/
dev/
log4j.properties
local/
log4j.properties
prod/
log4j.properties
When do maven build, run the following commands per environment:
mvn package -Dbuild.env=dev
mvn package -Dbuild.env=local
mvn package -Dbuild.env=prod