I have a maven project in which I am using axis2 which depends on rampart-core for security. Rampart has a default log4j.properties file which keeps my logging from being displayed. I would like to exclude that file from my dependency. How do I exclude a file from a dependency while still keeping the dependency around?
Asked
Active
Viewed 364 times
1 Answers
0
As a solution you can of course unpack the dependency (using the maven-dependencies-plugin), remove the properties file and repack the dependency (using the maven-assembly-plugin) and later depend on the repackaged artifact instead.
I find this whole process too cumbersome actually. Why aren't you just provide your own log4j.properties in src/main/resources to override the contained file?

Torsten
- 6,184
- 1
- 34
- 31
-
Customizaing my `src/main/resources/log4j.properties` does not alter how sshd-core logs. :( – apennebaker Dec 05 '13 at 15:47
-
Did you check your class-path order? – Torsten Dec 05 '13 at 16:59
-
Yeah, `mvn test -X` shows my project's classes and resources at the head of the classpath. – apennebaker Dec 06 '13 at 17:58