ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knuplesch, Juergen" <>
Subject AW: Jar and duplicate=preserve
Date Fri, 26 Feb 2010 15:37:46 GMT

Thabks for the replies.

I could now reproduce this behaviour under Windows, because I have now the environment copied
from Linux to Windows.
And it happened also!!!

But I also had the correct (for me) behaviour tested today under other circumstances. 

I do not understand this and keep on debugging and trying.


J├╝rgen Knuplesch          
icon Sy
-----Urspr├╝ngliche Nachricht-----
Von: Matt Benson [] 
Gesendet: Freitag, 26. Februar 2010 16:29
An: Ant Users List
Betreff: Re: Jar and duplicate=preserve

I think duplicate="preserve" actually implies that both entries are retained, per the ability
of the format to handle this seemingly illogical situation.


On Feb 26, 2010, at 9:21 AM, Antoine Levy Lambert wrote:

> Hello Juergen,
> my spontaneous answer is that duplicate="preserve" means that if a 
> jar/zip entry is encountered a second time, the original is preserved, 
> the second instance is not used, and no error message is displayed. 
> This might be in the documentation of the zip task. jar is an 
> extension of zip.
> Therefore, the behavior under linux would be a bug of Ant's packaging 
> tasks.
> Regards,
> Antoine
> Knuplesch, Juergen wrote:
>> Hello,
>> I do the following to get some special files into a jarfile (Applet):
>> <jar destfile="${applet.jarname}" update="true" duplicate="preserve">
>>         <fileset dir="${appletfix.include.dir}"></fileset>
>> </jar>
>>     <jar destfile="${applet.jarname}"         duplicate="preserve"
>>         update="true">
>> ....
>> There are two files in in both filesets that are added to the jar 
>> file.
>> Under Windows the first file is added to the jar in the first jar 
>> task and not changed with the second jar task.
>> Under Linux we experience the opposite behaviour. The second file is 
>> added and the first deleted.
>> Is this possible? What does duplicate="preserve" exactly mean?
>> It is not explained in the docu. I found it out by testing.
>> Greetings Juergen
> ---------------------------------------------------------------------
> 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