You must not put log4j.properties
into src/main/resources
.
Log4j will look just for a single log4j.properties
resource on the classpath, so depending on the order of elements on the classpath, either your code or the other project will win.
You can put this resource on the test classpath so your tests work correctly.
For the final application, you must load the file from somewhere else or create a kind of "application" Maven project which just contains dependencies, the code of main()
, and config files.