ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fichtner Enrico" <>
Subject Zip problem
Date Thu, 10 Oct 2002 14:15:32 GMT

when I use the Zip-task I get a strange behavior. 

Check this example:

<target name="zip">
		<zip destfile="C:\Temp\mw.gz" update="true">
			<zipfileset dir="${SOURCE}/Src" includes="*.cpp" prefix="${TARGET}/Src"/>    

		<zip destfile="C:\Temp\mw.gz" update="true">
			<zipfileset dir="${SOURCE}/Inc" includes="*.h" prefix="${TARGET}/Inc"/>    

I know that the two <zipfileset> could be in one <zip> task, but that's not the
point. That's the way I need it. Anyway, when I run it, it'll only zip the stuff from the
first zip-task. For the second one it claimes (-debug) that the zip file "is up to date".
Doesn't matter what I zip first, only the first one is added to the zip file. BTW: the zip
file is deleted at the begin of the script. 

Now the term "up to date" made me curious if this is caused by the timestamps of the source
files and the zip file. Taken this into consideration I've put the following lines after each

		<touch file="C:/Temp/mw.gz" datetime="01/01/2000 1:00 pm"/>		

... and voila - it works. But, I think this is a quick and dirty fix for something I can't
explain why.

Could someone explain it to me why <zip> acts like this?


Enrico Fichtner
Product Development Trading

ELAXY Brokerage & Trading GmbH & Co. KG
Am HofbrÀuhaus 1
96450 Coburg
Fon	+49 (0) 95 61. 55 43. 0
Fax	+49 (0) 95 61. 55 43. 302

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message