ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael B. Allen" <>
Subject RE: enhancements[now bug]
Date Sat, 08 Jul 2000 01:44:10 GMT
Ok, the Expand task does do the trick but I just noticed a bug. If you
"expand" a large file and then delete the zip right after it can fail to
delete it(presumably the expand task has the file locked). Not a big deal I
guess but I just thought you guys might like to know about it if you don't


System is a 150 Thinkpad 570 running win98. The target looks like this:

 <target name="prep_http">
   <mkdir dir="http"/>
   <copyfile src="${jini.lib}/sun-util.jar" dest="http/sun-util.jar"/>
   <copyfile src="${jini.lib}/jini-core.jar" dest="http/jini-core.jar"/>
   <copyfile src="${jini.lib}/jini-ext.jar" dest="http/jini-ext.jar"/>
   <copyfile src="${jini.lib}/reggie-dl.jar" dest="http/reggie-dl.jar"/>
   <expand src="http/sun-util.jar" dest="http/"/>
   <expand src="http/jini-core.jar" dest="http/"/>
   <expand src="http/jini-ext.jar" dest="http/"/>
   <expand src="http/reggie-dl.jar" dest="http/"/>
   <deltree dir="http/META-INF"/>
   <delete file="http/jini-core.jar"/>
   <delete file="http/jini-ext.jar"/>
   <delete file="http/reggie-dl.jar"/>
   <mkdir dir="http/swooshmail"/>
   <delete file="http/sun-util.jar"/>

As you can see I moved things around a little thinking the thread that's
expanding the larger sun-util.jar(96k) file would finish before the delete
was performed. Either it's another thread or the os isn't giving up the
file for a little while which would be a pretty bad bug in win98.

Here's the dir of the http directory after running the target:

.              <DIR>        07-07-00  9:29p .
..             <DIR>        07-07-00  9:29p ..
SWOOSH~1       <DIR>        07-07-00  9:29p swooshmail
JINI-EXT JAR        46,840  07-07-00  9:29p jini-ext.jar    <--failed to
REGGIE~1 JAR        56,349  07-07-00  9:29p reggie-dl.jar   <--failed to
COM            <DIR>        07-07-00  9:29p com
NET            <DIR>        07-07-00  9:29p net

you can see it didn't actually delete jini-ext.jar and reggie-dl.jar.

Now this might be my fault because I don't know how current my ant.jar is.
Verbose output reports 1.2.

> -----Original Message-----
> From: Conor MacNeill []
> > -----Original Message-----
> > From: Michael B. Allen []
> > Sent: Saturday, 8 July 2000 9:17
> > To:
> > Subject: RE: enhancements
> > the trick. I need something that can unzip a jar file such
> that it creates
> > the files and directories under the dest. I can see from
> Use the expand task - it performs an unzip

View raw message