tags:

views:

315

answers:

2

Hi,

I've got an ANT project with libs managed by ivy (they are under lib_managed). Eclipse is using the jars to. Probelm is: if I try to update the directory ant refuses to delete it because eclipse holds on to the jars in its classpath. Even if I update (empty) eclipses classpath I can't delete the files. If anyone had the same problem and found a solution I would be thankfull for an answer.

Regards, Jan

+1  A: 

I guess this is on Windows. Use the Process Explorer to figure out who is locking the files. Eclipse shouldn't keep a lock; maybe you have the code running in the debugger (hanging in a breakpoint). Use the list of open files and the properties to figure out which Java program is keeping the lock on the files.

If it's really Eclipse, try to upgrade to a newer version of Eclipse or close the project when you need to update the dependencies with ivy.

Aaron Digulla
Thanks. Yes this is on windows. Cleaning the workspace and restarting eclipse solved the problem. ;-)
Jan
+1  A: 

Not a solution, but a workaround. I experience Eclipse keeping locks on files quite often in different contexts. I suggest using Unlocker.

Grzegorz Oledzki
Good idea, but sadly my client doesn't like anyone to install any software not certified by their IT ... ;-) I'm lucky I can use cygwin.
Jan