You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Michael B. Allen" <mb...@erols.com> on 2000/07/08 03:44:10 UTC

RE: enhancements[now bug]

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
already.

Later,
Mike

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"/>
 </target>

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
delete
REGGIE~1 JAR        56,349  07-07-00  9:29p reggie-dl.jar   <--failed to
delete
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 [mailto:conor@m64.com]
> > -----Original Message-----
> > From: Michael B. Allen [mailto:mballen@erols.com]
> > Sent: Saturday, 8 July 2000 9:17
> > To: ant-dev@jakarta.apache.org
> > 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
>


RE: enhancements[was bug now bugfix]

Posted by Conor MacNeill <co...@m64.com>.
> -----Original Message-----
> From: Michael B. Allen [mailto:mballen@erols.com]
> Sent: Saturday, 8 July 2000 11:44
> To: ant-dev@jakarta.apache.org
> Subject: RE: enhancements[now bug]
>
>
> 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
> already.
>
> Later,
> Mike

Mike,

I have just changed expand to close the Zip file once it has expanded it.

Conor