ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject Re: Update manifest in jar with additional attribute
Date Thu, 27 Oct 2005 23:19:16 GMT
Karr, David wrote:

>I have a need to build a target that updates the manifest of a jar file
>with an additional attribute (perhaps replace if it's already present).
>If I use a jar task, with 'update="true"' and an inline manifest element
>containing the property I want to add, and no files specified, what is
>it likely to do?  Would this do exactly what I want, or would it replace
>the entire manifest, or replace the jar with no files, or something
Hello David,

the inline manifest will do a full replace, so you will end up with only
the property that you specified in your build file.
I do not think that there is direct support in ant to update a manifest.

The semantics of jar update="true" are to add or replace any entries in
the filesets/zipfilesets nested in the jar element,
which are newer than corresponding entries in the preexisting jar file,
or which were not in the jar file previously.

In Ant 1.6, it also removes the entries which are in the preexisting jar
file, but which are not listed in the nested filesets or zipfilesets.

This will change in Ant 1.7.



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

View raw message