ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gunnar Boström <Gunnar.N.Bost...@telia.se>
Subject RE: Cannot delete jar files
Date Wed, 08 Nov 2000 06:59:42 GMT
I think that del is not a stand alone cmd. It is part of the command
interpreter cmd. You must end up with something like:
cmd /c del /f ${jarfile} 

:-)


> -----Original Message-----
> From: Chris.Kunz@Level3.com [mailto:Chris.Kunz@Level3.com]
> Sent: den 7 november 2000 20:30
> To: ant-user@jakarta.apache.org
> Subject: RE: Cannot delete jar files
> 
> 
> 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