I had a hard time trying to let Maven know where to find log4j.properties when running JUnit. Found nothing in the Maven docs or on Google about this. A friend of mine (yo, Maarten!) helped me to find the solution.
I got every time the message "Please initialize the log4j system properly". I put log4j.properties in almost every possible directory (src/conf, src/java, ...).
Add this to project.properties:
#setup for junit testing
maven.junit.sysproperties=log4j.configuration
log4j.configuration=log4j.properties
And add this to project.xml. The trick is that you need to include the log4j.properties file as a resource here.
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<resources>
<resource>
<directory>${basedir}/src/test</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/conf</directory>
<includes>
<include>log4j.properties</include>
</includes>
</resource>
</resources>
</unitTest>