I made a maven project and are using slf4j with log4j. Also I am using jibx bindings.
src/main/java is my class folder src/main/config folder for jibx bindings and generated classes
both are declared as source folders
the log4j.properties is in the classpath (irelevant if it ist in java or config)
Here is the situtation: log4j works. I can start the programm out of eclipse or through the created jar file (maven) and logging works. But when I start "maven clean" and build the project again and start I get "log4j:WARN No appenders could be found for logger" Happens with starting out of eclipse or through jar file. The log4j.propeties won't be copied to target/classes and it will not be in the jar file. I move the log4j.properties in Eclipse from example java folder to config folder and back. Compile with maven again. The properties is in the classes folder and in the jar. I always have to do this after maven clean! I don't know why the properties is missing after clean. It's still in a folder in classpath. I don't change anything. Anyone have an idea how to fix it? It's realy disturbing. Thx to jibx it is nessesary to clean from time to time. I searched with google and only found problems with that when properties is NOT in classpath. But in my case it is.
If I missed any needed informations ask for it, please :)
EDIT: Argh, yes. properties not in resource folder was the problem. Fixed.
But still strange behavior if properties is not in resource folder. Even in Eclipse log4j stopps working after maven clean. And works again after moving properties around and back to beginning folder.