Ant won't delete a file - any ideas?
I've been experiencing this problem for the last couple of days. Basically, when I run "ant clean" on my project, I get the following error:
file:d:/source/appfuse/build.xml:746: Unable to delete file D:\source\appfuse\dist\appfuse-common.jar
I can delete the "dist" directory in Explorer, and also using "rm -r dist" in Cygwin. Any ideas why Ant is choking on this all of a sudden?
Posted by Erik Hatcher on December 27, 2002 at 06:02 AM MST #
Posted by Matt Raible on December 27, 2002 at 06:18 PM MST #
Posted by Chris Reeves on December 27, 2002 at 06:25 PM MST #
Posted by Matt Raible on December 27, 2002 at 06:26 PM MST #
Posted by Erik Hatcher on December 29, 2002 at 11:36 AM MST #
Posted by Yogesh on January 15, 2003 at 09:40 PM MST #
I had the same problem just with my own homemade Ant script (not an Eclipse problem or anything like that). I tried everything from file access to voodo incantations and nothing seemed to work.
Then one day as I was just about to give up and explore a new career in vetrenary psycology, it dawned on me... Ant is written in Java! That means it uses classpath. That means if my .jar file is in the classpath than Ant's JVM is probably preloading it, and if its in use, then OF COURSE you can't delete it.
<div style="background:#ffff00">Sure enough, my classpath was ".;c:\jdk;yadda yadda" I removed the ".;" and it works every time!</div>
Well, Vaya Con Dios,
-Kurt
Posted by Kurt on October 26, 2004 at 04:46 PM MDT #
Posted by Tom on February 04, 2005 at 04:01 PM MST #
Posted by Joel on February 17, 2005 at 06:07 PM MST #
Posted by Logi Helgu on September 06, 2005 at 01:18 PM MDT #
Posted by Zhao Ke on November 01, 2006 at 08:44 AM MST #
Posted by Bob P. on November 25, 2008 at 08:31 PM MST #
Posted by Vasko on October 27, 2009 at 12:26 PM MDT #
Posted by Vasko on October 27, 2009 at 12:27 PM MDT #
Posted by Thom on February 02, 2010 at 01:51 PM MST #
Posted by Kenny Cason on March 31, 2011 at 06:18 PM MDT #
Posted by Frank on March 04, 2013 at 08:50 PM MST #