Remove file from dependency jar using maven

前端 未结 3 648
说谎
说谎 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:54

    You can achieve this with the TrueZIP Maven Plugin.

    This should work for your use case:

    
        org.codehaus.mojo
        truezip-maven-plugin
        1.1
        
            
                remove-a-file-in-sub-archive
                
                    remove
                
                package
                
                    
                        target/my-webapp.war/WEB-INF/lib/dependency.jar/META-INF
                        
                            persistence.xml
                        
                    
                
            
        
    
    

    Also see the examples.

提交回复
热议问题