1

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?

user294241
  • 59
  • 2
  • 3
  • 5

1 Answers1

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