Hello,
I find the behavior of 'zip' strange when writing my build.xml. So I extracted
a test case:
<?xml version="1.0"?>
<project name="test" default="test">
<target name="test">
<zip
destfile="newfile.zip"
whenempty="create"
duplicate="fail"
update="false">
<fileset dir="." includes="file1"/>
</zip>
<!-- I expects newfile.zip only contains file1 -->
<zip
destfile="newfile.zip"
whenempty="create"
duplicate="fail"
update="true">
<fileset dir="." includes="file2"/>
</zip>
<!-- I expects newfile.zip contains file1, file2 -->
</target>
</project>
What is the problem ?
If newfile.zip already exists with 'file3' inside, 'file3' remains because
'zip' seems to work in 'append' mode only.
And there is no way to make it create a new empty zip file if the destfile
already exists.
OK, I will do a 'delete' first. It is a work-around.
But I may find it useful to document this behavior and maybe to add a flag to
force new zip file creation.
Regards,
--
Yves Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]