I encountered this problem once. It was because the file I tried to delete was a part of a classpath for another task.
It depends ... The Ant process doesn't have enough permissions to delete the files (typically because they were created by a different user, perhaps a system user). Try running your Ant script as an administrative user, using Run As. Windows is really bad at cleaning up file locks when processes die or are killed; consequently, Windows thinks the file is locked by a process that died (or was killed).
There's nothing you can do in this situation other than reboot. Get better tools to inspect your system state. I recommend downloading the SysInternals tools and using them instead of the default Windows equivalents.
I agree with point 3. Sysinternals handle. Exe is invaluable as a command line tool to analyse this sort of problem.
– Richard A Oct 24 '08 at 1:30 Okay, so sysinternals shows me that javaw. Exe has a handle on a file or directory, now what? – Snekse Mar 11 at 15:25.
You don't say if your build is run as the currently logged on user. If not, the fact that explorer. Exe or other process has the directory shown can cause it to be locked as well.
But deleting it in that same explorer. Exe process would succeed. Try Unlocker from ccollomb.free.fr/unlocker/ to see what processes have the files/directories locked.
This would cause the situation where you could delete them after running ant, but not during.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.