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
>else?
>
>  
>
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.

Cheers,

Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to