I had similar issues when using retrieved libs in my compile and test stages.
The solution is instead to use ivy:cacheclasspath to populate the build and test classpath, and only use retrieve for deployment. Thanks, Kirby Files -----Original Message----- From: Imner, Andreas <andreas.im...@kgk.se> Sent: Friday, April 16, 2010 5:26 AM To: ivy-u...@ant.apache.org <ivy-u...@ant.apache.org> Subject: Why is Ivy locking my resolved dependencies until Ant finishes processing? Hi I have a problem with Ivy that is blocking me from using it for creating my daily builds. I am using Windows and this problem does not appear on, for example, MacOS. My daily build -Ant target triggers (among others), the following Ant targets 1. clean - cleaning /build and /lib 2. test - resolving 3:rd party dependencies (conf="test") using Ivy to /lib, compiling classes + test classes and executing the junit tests 3. release - cleaning /build and /lib, resolving 3:rd party dependencies (conf="run") using Ivy, compiling the classes and assembling my webapp. When running these targets within the same Ant "session" (like "/> ant clean test release") or when calling these targets from a single target, using the "ant" -task the following happens in the beginning of the "release" -target: C:\dev\trunk\04_Implementation\webshop-ng\build.xml:228: Unable to delete file C:\dev\trunk\04_Implementation\webshop-ng\lib\activation-1.1.1.jar But if I run the targets one by one, like ant clean ant test ant release ... the problems does not appear If I add a <sleep minutes="5"/> to my build.xml and the use handle.exe, a sysinternals program for checking file handles, I can see that the Ant java process has file handles open for all the resolved 3rd party jars in /lib Also as a test, during the <sleep.../>, I tried deleting the files in /lib using Windows explorer, but of course this didn't work either. Does anyone have a solution or suggestion for this issue? I don't think Im the only one using windows and multiple targets withing the same Ant "session"? Regards, Andreas Imner