ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "webhiker%tiscali.fr" <webhi...@tiscali.fr>
Subject Missing & misleading documentation, help needed on advanced Jar functionality
Date Tue, 11 Feb 2003 09:34:21 GMT
The problem :
I want to combine all the jars required by my application into a single, 
executable jar file. Ant is good for this.
However, the JavaBeans Activation Framework jar needs certain manifest 
info, else it generates an error :
Exception in thread "main" java.lang.SecurityException: no manifiest 
section for signature file entry 
javax/activation/DataContentHandlerFactory.class
sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:260)

The solution:
Ant docs for jar task indicate it's possible to include manifest 
information from a jar file, and combine it with any other info you 
include. However, no example is given. It also states falsely, that 
"This element is identical to the manifest task".

So I try :
<jar...
  <manifest file="${activation.jar}">
    <attribute name="Built-By" value="${user.name}"/>
    <attribute name="Main-class" value="mypackage.MyName"/>
   </manifest>
</jar>

Ant complains "org.apache.tools.ant.taskdefs.Manifest doesn't support 
the "file" attribute."
So it's not identical.
But I cannot find any other info which allows me to specify how to tell 
the jar task where to copy the manifest info from.

It may be more complicated, since look at the contents of activation.jar 
manifest:
META-INF/MANIFEST.MF
META-INF/SUN_MICR.SF
META-INF/SUN_MICR.RSA
META-INF/
META-INF/mailcap.default
META-INF/mimetypes.default


Anyone have an idea?

Thanks
WH


Mime
View raw message