title: How to remove signature from dependency jar?
body: <p>I have a <code>Maven</code> project foo, which is a webstart. In order to be distributable via browser, the contents need to be jarsigned, which I do using <code>maven-jarsigner-plugin</code>:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-jarsigner-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.4&lt;/version&gt;
      &lt;executions&gt;
        &lt;execution&gt;
          &lt;phase&gt;package&lt;/phase&gt;
          &lt;id&gt;sign&lt;/id&gt;
          &lt;goals&gt;
            &lt;goal&gt;sign&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
      &lt;configuration&gt;
        &lt;keystore&gt;mykeystore.jks&lt;/keystore&gt;
        &lt;alias&gt;myalias&lt;/alias&gt;
        &lt;storepass&gt;mypass&lt;/storepass&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>That part works. However, the utterly awkward scenario is that I need to use some modules from the webstart jar in a server side component, let's call it bar, that runs as a <code>Tomcat</code> module as a war file. I didn't design this -- it's a huge hack so I don't need advice on what a bad design that is. It's a legacy constraint I have to work within for now.</p>
  
  <p>The problem is, when I declare foo as a dependency to bar, it takes the jarsigned foo.jar -- and then I get a <a href="https://stackoverflow.com/questions/2877262/java-securityexception-signer-information-does-not-match?noredirect=1&amp;lq=1"><code>java.lang.SecurityException</code></a> because the rest of bar.war is not signed. </p>
  
  <p><strong>QUESTION:</strong> Is there a way for me to either </p>
  
  <ol>
  <li><p>Save both a signed and unsigned jar in the build process of foo and then call the unsigned as a dependency to bar -- or  </p></li>
  <li><p>Remove the signature in the single signed foo.jar in the dependency declaration within bar's <code>pom.xml</code>?</p></li>
  </ol>