[ http://jira.codehaus.org/browse/MJAR-41?page=comments#action_67156 ]
Fredrik Vraalsen commented on MJAR-41: -------------------------------------- It seems the spec and the implementation are not quite in agreement, unfortunately. I've tested with multiple Class-Path entries in the manifest file, and this does not seem to work with JDK 1.5.0 update 6 on Windows XP at least. It gives the following output: $ java -jar test.jar 12.jun.2006 11:48:10 java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Class-Path 12.jun.2006 11:48:10 java.util.jar.Attributes read WARNING: Duplicate name in Manifest: Class-Path and then I get a NoClassDefFoundError on one of the classes from the first Class-Path entry. $ java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) > Cannot specify additional classpath entries in jar manifest when using > addClasspath > ----------------------------------------------------------------------------------- > > Key: MJAR-41 > URL: http://jira.codehaus.org/browse/MJAR-41 > Project: Maven 2.x Jar Plugin > Type: Bug > Versions: 2.1, 2.0 > Environment: Maven 2.0.4, maven-jar-plugin 2.0 and 2.1-SNAPSHOT, JDK > 1.5.0_06, Windows XP > Reporter: Fredrik Vraalsen > > > The plugin configuration snippet below leads to the generation of an illegal > jar manifest file, as it contains two Class-Path entries. This works in > Maven 1.1b2 by adding the following to project.properties: > maven.jar.manifest.classpath.add=true > maven.jar.classpath=help/ resources/ > For more information, please see > http://www.nabble.com/classpath-in-jar-manifest-t1582724.html > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-jar-plugin</artifactId> > <configuration> > <archive> > <manifest> > <addClasspath>true</addClasspath> > </manifest> > <manifestEntries> > <Class-Path>help/ resources/</Class-Path> > </manifestEntries> > </archive> > </configuration> > </plugin> -- 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