Peter Reilly <[EMAIL PROTECTED]> writes:

> I do not see the behaviour you describe:
>   <target name="test">
>     <delete file="newfile.zip" quiet="yes"/>
>     <touch file="file1"/>
>     <touch file="file2"/>
>     <touch file="file3"/>
>     <zip
>       destfile="newfile.zip"
>       whenempty="create"
>       duplicate="fail"
>       update="false">
>       <fileset dir="." includes="file3"/>
>     </zip>
>     <ac:shellscript shell="bash">
>       jar tf newfile.zip
>     </ac:shellscript>
>     <zip
>       destfile="newfile.zip"
>       whenempty="create"
>       duplicate="fail"
>       update="false">
>       <fileset dir="." includes="file1"/>
>     </zip>
>     <ac:shellscript shell="bash">
>       jar tf newfile.zip
>     </ac:shellscript>
>     <!-- I expects newfile.zip only contains file1 -->
>     <zip
>       destfile="newfile.zip"
>       whenempty="create"
>       duplicate="fail"
>       update="true">
>       <fileset dir="." includes="file2"/>
>     </zip>
>     <ac:shellscript shell="bash">
>       jar tf newfile.zip
>     </ac:shellscript>
>     <!-- I expects newfile.zip contains file1, file2 -->
>   </target>

 In fact, my test does not reproduce the issue correctly:

 Replace your first zip by:

     <zip
       destfile="newfile.zip"
       whenempty="create"
       duplicate="fail"
       update="false">
       <fileset dir="." includes="file1,file2,file3"/>
     </zip>

 So here is the issue:

 - if selected files are up-to-date in an existing zip, the file is not rebuild
   BUT it may contains unwanted files !!!

 I do not know if we can consider it a "feature" - so to document - or a bug...


 But the result is strange:

 - if the zip does not exist yet, it only contains file1,file2

 - if the zip already exists (maybe with too many files), its content is
   unchanged.

 In my case, it is really annoying: if you change excludes filters with an
 already generated zip - the contain "remains", so the result is wrong...

 Regards,
-- 
Yves Martin


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

Reply via email to