ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris.K...@Level3.com
Subject RE: Cannot delete jar files
Date Tue, 07 Nov 2000 19:30:14 GMT
I ran into the same problem yesterday.  I used the following task:
    <exec dir="${apps.dir}" os="Windows NT" executable="del">  
         <arg value="/f"/>
         <arg value="${jarfile}"/>
    </exec>
 
I still get an error when building but the delete works.  A better solution
would be appreciated.

Thanks

-----Original Message-----
From: William Settle [mailto:William.Settle@alltel.com]
Sent: Tuesday, November 07, 2000 10:01 AM
To: ant-user@jakarta.apache.org
Subject: Cannot delete jar files


I hope someone can tell me what I'm doing wrong.

In my build file I jar two sets of packages and for discussion sake, I'll
call
them a.jar and b.jar.  Both files are included in my classpath because
classes
in b.jar import classes from a.jar and is required at compile time (I delete
the
source files after successful jar creation).  After a successful build
everything's fine unless I re-run the build.  My "clean" target attempts to
delete existing jars but fails with a message that says:

BUILD FAILED
C:\autoBuild\build.xml:23: Unable to delete file D:\develop\jar\a.jar

I am running Windows 2000 and if I try to delete the jar files from the
command
line, I get a message saying that it cannot be deleted because another
process
is using it.  However, I can go to Explorer and delete it from there without
error.

The only process I know of that opened the jar file would have been Javac.

Do anyone have any ideas?

Thanks in advance,
Bill

Mime
View raw message