Remove file from dependency jar using maven

Posted by Matt Campbell on Stack Overflow See other posts from Stack Overflow or by Matt Campbell
Published on 2010-05-13T22:53:21Z Indexed on 2010/05/13 23:34 UTC
Read the original article Hit count: 213

Filed under:

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 persistence.xml file that I don't want.

Here's what is going on:

my-webapp.war
|
`-- WEB-INF
    |
    `-- lib
        |
        `-- dependency.jar
            |
            `-- META-INF
                |
                `-- persistence.xml

When I am building my war, I want to remove persistence.xml Any one have any idea if this can be done easily?

© Stack Overflow or respective owner

Related posts about maven