maven jar-with-dependencies log4j

限于喜欢 提交于 2019-12-11 09:44:53

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/8689619/maven-jar-with-dependencies-log4j

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!