title: Sign a jar file created with maven-assembly plugin
body: <p>I'd like to build an assembly and then sign it. My problem is that the jarsigner signs not the assembly, only the standalone jar file. Could you tell me what is the problem? Maven seems like 'magic' to me after having used Ant for years.. I can't see the way the plugins cooperate and pass information to each other.</p>
  
  <p>After executing <code>mvn install</code>, I get two jar files, one called <code>example-1.0.0-SNAPSHOT.jar</code> and this is signed, and one called <code>example-1.0.0-jar-with-dependencies.jar</code> and this is not signed. I do not need the solo one, only the assembly, but that signed.</p>
  
  <p>Here is my pom.xml:</p>
  
  <pre><code>&lt;build&gt;
          &lt;plugins&gt;
              &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.2&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&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;${project.basedir}\keystore\mykeystore&lt;/keystore&gt;
                      &lt;alias&gt;myalias&lt;/alias&gt;
                      &lt;storepass&gt;...&lt;/storepass&gt;
                      &lt;keypass&gt;...&lt;/keypass&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;make-my-assembly&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;single&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;mainClass&gt;com.example.FooBar&lt;/mainClass&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                      &lt;appendAssemblyId&gt;true&lt;/appendAssemblyId&gt;
                      &lt;descriptorRefs&gt;
                          &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                      &lt;/descriptorRefs&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  </code></pre>