title: Removing file from jar
body: <p>I have a jar file in a project that I need to remove a persistence.xml from</p>
  
  <p>I found this questions</p>
  
  <p><a href="https://stackoverflow.com/questions/2830837/remove-file-from-dependency-jar-using-maven">Remove file from dependency jar using maven</a></p>
  
  <p>but it doesn't seem to have worked for me.</p>
  
  <p>I added the following to my pom.xml</p>
  
  <pre><code>&lt;plugin&gt;
                      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                      &lt;artifactId&gt;truezip-maven-plugin&lt;/artifactId&gt;
                      &lt;version&gt;1.1&lt;/version&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;id&gt;remove-a-file-in-sub-archive&lt;/id&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;remove&lt;/goal&gt;
                              &lt;/goals&gt;
                              &lt;phase&gt;package&lt;/phase&gt;
                              &lt;configuration&gt;
                                  &lt;fileset&gt;
                                      &lt;directory&gt;target/app/WEB-INF/lib/jarname/META-INF&lt;/directory&gt;
                                      &lt;includes&gt;
                                          &lt;include&gt;persistence.xml&lt;/include&gt;
                                      &lt;/includes&gt;
                                  &lt;/fileset&gt;
                              &lt;/configuration&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
  </code></pre>
  
  <p>If the jar is called jarname.jar, should I mention the .jar in the path. I'd imagine not. I'm using Maven 2.2.1 if that's worth mentioning.</p>