Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.6
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Setting maven.jar.manifest.classpath.add=true only adds the classpath to the jar file, but does not include the actual jars in the dependency.
A much cleaner approach is provided by the EJB plugin, where you add properties in the POM dependencies, thus:
<properties>
<ejb.manifest.classpath>true</ejb.manifest.classpath>
<ejb.bundle>true</ejb.bundle>
</properties>
For the JAR plugin it should be:
<properties>
<jar.manifest.classpath>true</jar.manifest.classpath>
<jar.bundle>true</jar.bundle>
</properties>
And then, we should completely get rid of that maven.jar.manifest.classpath.add thing.
A related issue (but not quite the same) appears in http://jira.codehaus.org/browse/MPJAR-25.
An alternative approach, including a patch, was provided in http://jira.codehaus.org/browse/MPJAR-4, HOWEVER, the patch unzips the included jar files, complicating the jar file unnecessarily. (I suppose this could be an option, such as "maven.jar.explode.jars", to support J2ME, which cannot handle embedded jar files.)