ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Henriksson <>
Subject Re: Jar Task Manifest Attribute
Date Wed, 06 Nov 2013 18:35:20 GMT

I'm not sure if there's any way I can use the manifest element to
obtain the manifest from a jar file, which is why I'm using the
manifest attribute.

The phrase "added through a fileset" is really not clear to me. Here's
an example of a build file that does not work, and uses the very
obvious interpretation:

<project name="Test_Jar" default="jar">
    <target name="jar">
        <jar destfile="jar1.jar">
                <attribute name="Main-Class" value="com.example.MainClass"/>
        <jar destfile="jar2.jar" manifest="jar1.jar">
            <fileset dir="." includes="jar1.jar"/>

I don't actually have a manifest attribute like that in the real build
file. This is just for illustration purposes.


On Wed, Oct 30, 2013 at 9:38 AM, Echlin, Robert
<> wrote:
> Hi Ken,
> Did you try both the manifest attribute and the manifest element?
> Can you give us a copy of your code, or a simplified version that "manifests" the same
> For one thing, that would let us see what exactly you tried in the code when you interpreted
the ambiguous phrase "added through a fileset".
> <g>
> All my very best,
> Rob
> --
> Rob Echlin, Documentation Systems Architect, Wind River
> -----Original Message-----
> From: Kris Henriksson []
> Sent: Saturday, October 19, 2013 4:44 PM
> To:
> Subject: Jar Task Manifest Attribute
> Hello,
> The documentation for the Jar task
> ( indicates that the manifest attribute can
be set to "the name of a jar added through a fileset". However, I can't get this to work,
and can't find an example of this usage anywhere. When I try, I get an error "Manifest is
invalid" and the output suggests that it is just reading in the jar file as text and parsing
it, which is of course invalid.
> Can anyone provide me an example of this usage? Any help would be appreciated.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message