I have two local maven projects A, and B. B is dependent on A.

|- resources/log4j2.xml

|- resources/META-INF/log4j.xml
|- Maven Dependencies
    |- A
    |- And other dependencies...

Both A, and B exports the log4j xmls to jar. However, as I only need the B/resources/META-INF/log4j.xml to my final B.jar, I tried to delete the log4j2.xml from A while packing B.jar.

To do the same, I used truezip:remove in B/pom.xml as follows:


Note that this is executed verify state (post packaging) of lifecycle.

Though it is working as expected, I am wondering whether there is any side-effect of this or not. Any light in this regard would be great.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.