ant-user mailing list archives

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

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">
            <manifest>
                <attribute name="Main-Class" value="com.example.MainClass"/>
            </manifest>
        </jar>
        <jar destfile="jar2.jar" manifest="jar1.jar">
            <fileset dir="." includes="jar1.jar"/>
        </jar>
    </target>
</project>

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

Kris

On Wed, Oct 30, 2013 at 9:38 AM, Echlin, Robert
<Robert.Echlin@windriver.com> 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
behavior?
>
> 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 [mailto:kthenriksson@gmail.com]
> Sent: Saturday, October 19, 2013 4:44 PM
> To: user@ant.apache.org
> Subject: Jar Task Manifest Attribute
>
> Hello,
>
> The documentation for the Jar task
> (http://ant.apache.org/manual/Tasks/jar.html) 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: user-unsubscribe@ant.apache.org For additional commands, e-mail:
user-help@ant.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message