Reputation: 417
How can I add log4j to my classpath in a maven project org.apache.log4j.PropertyConfigurator.configure("log4j.properties"); gives me error
log4j:ERROR Could not read configuration file [log4j.properties].
java.io.FileNotFoundException: log4j.properties (No such file or directory)
Upvotes: 0
Views: 115
Reputation: 24134
You generally add these properties files to src/main/resources
folder for a maven project, and included it in the build properties in pom.xml
:
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
Upvotes: 1