I want to be able to use different log4j configuration for different environments.
In my development environment, I want to use log4j.properties (A). But when I bui
You don't need the maven-resources-plugin if you have a simple environment.
In this example, log4j.properties B is the file you use for production and is in the directory src/main/java and log4j.properties A is the file you use for development and is in the directory /Users/junger/.m2/.
In your pom.xml:
src/main/java
${log4j.properties.directory}
log4j.properties
Now, in your /Users/junger/.m2/settings.xml (create one if it doesn't exist):
dev
true
/Users/devuser/.m2/
By using this method, each developer can have a different log4j.properties directory and you keep your pom.xml clean.