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:[EMAIL PROTECTED]

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

Reply via email to