I use Log4J and build my applications with Maven2. I have a log4j.xml config file in the src/main/resources directory so that Maven2 builds it into the JAR with my application.

However, I have a different log4j.xml that I want to use with the JUnit tests that run as part of my Maven build process. I'd like to put that log4j.xml (testing) in the src/test/resources directory and have it overide the production version in src/main/resources. However, Maven doesn't seem to work that way. Instead, the production version of log4j.xml seems to come first on the testing classpath and therefore gets loaded instead of the testing version of log4j.xml.

I'm sure others must have faced this issue. Are there any recommended solutions to the problem?

Thanks,

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to