1

I'm building an executable jar-with-dependencies using maven. My application uses log4j and there's an appropriate log4j.properties file under src/resources.

My problem is that there are other log4j.properties files floating around so when maven builds the jar-with-dependencies, it's grabbing one of those instead of the one I want it to, and skipping any others it finds due to log4j.properties already being included.

Anyone know of a way around this?

jgerman
  • 2,161
  • 3
  • 13
  • 10

1 Answers1

3

As per the documentation of jar-with-dependencies, it is a very blunt instrument. For better control, use the maven-shade-plugin, where you can exclude all those unwanted files.

bmargulies
  • 97,814
  • 39
  • 186
  • 310