ant-user mailing list archives

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

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>

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

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
zip-task:

		<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?

Thanks!!




Enrico Fichtner
Software-Developer
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
mailto:enrico.fichtner@elaxy.de

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message