Remove file from dependency jar using maven

前端 未结 3 645
说谎
说谎 2020-12-06 10:18

I am trying to remove a file from a dependency jar that I am including in my war file in maven. I am deploying the war to JBoss 5.1 and the jar in question contains a persis

3条回答
  •  执念已碎
    2020-12-06 10:43

    I guess you would have to use the maven shade plugin (see link below)

    Either build an Über-jar that includes your dependency minus the persistence-xml or just transform the dependency into something new that does not have the persistence.xml.

    This should be the way to go:

    http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html

    Sean

提交回复
热议问题