[ http://jira.codehaus.org/browse/MASSEMBLY-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106876 ]
Brian Jackson edited comment on MASSEMBLY-64 at 9/9/07 11:40 AM: ----------------------------------------------------------------- Anyone else that just wants to know how to customize the jar-with-dependencies descriptor to fix this problem (like I did) here's what you need: <assembly> <id>jar-with-dependencies</id> <formats> <format>jar</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <outputDirectory></outputDirectory> <outputFileNameMapping></outputFileNameMapping> <unpack>true</unpack> <scope>runtime</scope> <unpackOptions> <excludes> <exclude>/META-INF/*.RSA</exclude> <exclude>/META-INF/*.DSA</exclude> <exclude>/META-INF/*.SF</exclude> <exclude>/META-INF/*.rsa</exclude> <exclude>/META-INF/*.dsa</exclude> <exclude>/META-INF/*.sf</exclude> </excludes> </unpackOptions> </dependencySet> </dependencySets> <fileSets> <fileSet> <directory>target/classes</directory> <outputDirectory></outputDirectory> </fileSet> </fileSets> </assembly> was: Anyone else that just wants to know how to customize the jar-with-dependencies descriptor to fix this problem (like I did) here's what you need: <assembly> <id>jar-with-dependencies</id> <formats> <format>jar</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <outputDirectory></outputDirectory> <outputFileNameMapping></outputFileNameMapping> <unpack>true</unpack> <scope>runtime</scope> <unpackOptions> <excludes> <exclude>**/META-INF/*.RSA</exclude> <exclude>**/META-INF/*.DSA</exclude> <exclude>**/META-INF/*.SF</exclude> <exclude>**/META-INF/*.rsa</exclude> <exclude>**/META-INF/*.dsa</exclude> <exclude>**/META-INF/*.sf</exclude> </excludes> </unpackOptions> </dependencySet> </dependencySets> <fileSets> <fileSet> <directory>target/classes</directory> <outputDirectory></outputDirectory> </fileSet> </fileSets> </assembly> > jar-with-dependencies has a last-one-copies-wins policy which can fail signed > jars > ---------------------------------------------------------------------------------- > > Key: MASSEMBLY-64 > URL: http://jira.codehaus.org/browse/MASSEMBLY-64 > Project: Maven 2.x Assembly Plugin > Issue Type: Bug > Affects Versions: 2.0.1 > Reporter: Geoffrey De Smet > Assignee: Allan Ramirez > Fix For: 2.1 > > Attachments: MASSEMBLY-64-maven-assembly-plugin.patch > > Original Estimate: 5 hours > Time Spent: 1 hour, 30 minutes > Remaining Estimate: 3 hours, 30 minutes > > I've configured the plugins like this: > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-jar-plugin</artifactId> > <configuration> > <archive> > <manifest> > <mainClass>ggg.GGGStandaloneApp</mainClass> > <addClasspath>true</addClasspath> > </manifest> > </archive> > </configuration> > </plugin> > <plugin> > <artifactId>maven-assembly-plugin</artifactId> > <configuration> > <descriptorId>jar-with-dependencies</descriptorId> > <archive> <!-- Please document this --> > <manifest> > <mainClass>ggg.GGGStandaloneApp</mainClass> > </manifest> > </archive> > </configuration> > </plugin> > BTW: Please document the archive option in the assembly plugin on the > assembly site, it took me a while of trial and error to find it. > However the application doesn't work yet, because: > Exception in thread "main" java.lang.SecurityException: no manifiest section > for signature file entry javax/activation/D > ataContentHandlerFactory.class > at sun.security.util.SignatureFileVerifier.verifySection(Unknown > Source) > at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source) > at sun.security.util.SignatureFileVerifier.process(Unknown Source) > at java.util.jar.JarVerifier.processEntry(Unknown Source) > ... > It looks like it's because the everything in the META-INF directory have a > last-one-copied-wins policy. > Jar-jar would also solve this of course. > PS: I am also using acegisecurity, so I belive you can replicate this issue > by making an assembly of a HelloWorld dependend on acegi & activation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira