You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Hayden, Arlin K" <ar...@lmco.com> on 2007/10/17 23:26:03 UTC

Assembly with dependant JARs containing signed classes

I am trying to create an assembly using jar-with-dependencies
descriptorRef with the mainClass specified.  The result is a jar with
all of the dependant jar's 'unJARed' into my resulting jar and a
manifest which specifies the 'Main-Class'.  The problem is that some of
the dependant JARs (which were unJARed into my resulting JAR) contain
manifests with class signatures.  And, the 'resulting' jar's manifest
does not contain these class signatures.  Thus, when I attempt to
execute the JAR (java -jar ...) I get the error, "Exception in thread
"main" java.lang.SecurityException: no manifiest section for signature
file entry".

 

Is there a way to request the dependant JARs' manifest entries be merged
into the resulting JAR's manifest (e.g., the class signatures of the
unJARed dependant JARs are copied into the resulting JAR's manifest)?
Or, do I need to manually extract the elements needed and place them in
a manifest that I specifically include via the <manifestfile> tag?

 

Below is a sample of my POM:

            ...

            <packaging>jar</packaging>

            ...

            <plugins>

                        <plugin>

 
<groupId>org.apache.maven.plugins</groupId>

 
<artifactId>maven-assembly-plugin</artifactId>

                                    <configuration>

                                                <descriptorRefs>

 
<descriptorRef>jar-with-dependencies</descriptorRef>

                                                </descriptorRefs>

                                                <archive>

                                                            <manifest>

 
<mainClass>...</mainClass>

                                                            </manifest>

                                                </archive>

                                    </configuration>

                        </plugin>

            </plugins>

 

Thank,

Arlin