Bug 17648 - <zipfileset> not working for zip task
<zipfileset> not working for zip task
Status: RESOLVED FIXED
Product: Ant
Classification: Unclassified
Component: Core tasks
1.5.2
PC All
: P3 normal (vote)
: 1.5.3
Assigned To: Ant Notifications List
:
: 15286 17675 17730 17923 18196 18600 18608 18768 18809 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2003-03-04 21:38 UTC by Viet
Modified: 2008-02-22 12:18 UTC (History)
9 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Viet 2003-03-04 21:38:55 UTC
Under 1.5.2, this <zipfileset> element will not add the file to the zip file. 
It work Ok under 1.5.1
Comment 1 Antoine Levy-Lambert 2003-03-05 17:31:41 UTC
can you enter some details concerning your problem. zipfileset has been tested 
with ant 1.5.2
Comment 2 Viet 2003-03-05 18:58:03 UTC
For the same build.xml, under Ant 1.5.2, it add the file to the zip the file 
size increase. However you cannot view using Winzip. Using pkzip25, you saw it 
under zip file but you cannot extract it. Under Ant 1.5.1, it work as expected.

        <zip destfile="${release.dir}/${build.product}
_Release_${build.filelabel}.zip">
            <fileset dir="${build.dir}"   includes="${build.versionfile}" />
            <fileset dir="${release.dir}" includes="${build.product}
_Release_${build.filelabel}_Notes.doc" />
        	<zipfileset dir="${release.dir}/${product.package.dir}" 
prefix="${product.package.dir}" />
        </zip>

Comment 3 Antoine Levy-Lambert 2003-03-05 21:17:43 UTC
this looks like the same problem as bug# 17675
Comment 4 Antoine Levy-Lambert 2003-03-05 21:41:55 UTC
the line 540 of Zip.java should be fixed :


-            fileMode = zfs.getDirMode();


+            fileMode = zfs.getFileMode();
Comment 5 Viet 2003-03-05 23:55:27 UTC
Hope this fix going to next release 1.5.3.
Comment 6 Viet 2003-03-06 00:57:10 UTC
I download the source code for Ant 1.5.2 and cound not find line 540. I thought
it may be the line 520 of file
C:\apache-ant-1.5.2\src\main\org\apache\tools\ant\taskdefs\Zip.java dated
02/28/2003 . I'm using the TextPad 4.6 as editor.

Compiled under Windows 2000 and Java 2 SDK version 1.4.1_02 and tested. It worked.
Comment 7 Antoine Levy-Lambert 2003-03-06 07:03:38 UTC
sorry it is line 467 actually from 


/ src / main / org / apache / tools / ant / taskdefs / Zip.java 


Revision: 1.78.2.11


in the procedure 


    protected final void addResources(FileSet fileset, Resource[] resources,


                                      ZipOutputStream zOut)


Comment 8 Karl 2003-03-06 09:21:23 UTC
*** Bug 17675 has been marked as a duplicate of this bug. ***
Comment 9 Stefan Bodewig 2003-03-07 08:18:34 UTC
setting the target milestone to 1.6, but I get the feeling that a 1.5.3 is
warranted.

I've applied Antoine's patch, could you please verify that the problem is fixed
by using the next nightly build (no earlier than 2003-03-08).
Comment 10 Antoine Levy-Lambert 2003-03-08 00:09:40 UTC
*** Bug 15286 has been marked as a duplicate of this bug. ***
Comment 11 Antoine Levy-Lambert 2003-03-08 00:13:49 UTC
*** Bug 17730 has been marked as a duplicate of this bug. ***
Comment 12 Stefan Bodewig 2003-03-12 16:33:13 UTC
*** Bug 17923 has been marked as a duplicate of this bug. ***
Comment 13 Stefan Bodewig 2003-03-21 07:09:56 UTC
*** Bug 18196 has been marked as a duplicate of this bug. ***
Comment 14 Stefan Bodewig 2003-04-02 08:16:09 UTC
*** Bug 18600 has been marked as a duplicate of this bug. ***
Comment 15 Stefan Bodewig 2003-04-02 13:54:03 UTC
*** Bug 18608 has been marked as a duplicate of this bug. ***
Comment 16 Stefan Bodewig 2003-04-07 15:57:52 UTC
*** Bug 18768 has been marked as a duplicate of this bug. ***
Comment 17 Stefan Bodewig 2003-04-08 12:54:31 UTC
*** Bug 18809 has been marked as a duplicate of this bug. ***