Monday, February 28, 2011

Groovy Nature Locks Jar Files in Eclipse Project

For the past few months many of us have been struggling with an issue where we can’t Get Latest on Jar files stored in TFS when using TEE (or Teamprise). The issue is that TEE can’t overwrite the local file because the file is locked by Eclipse. (non-Windows users would not see this as Mac and Linux platforms use a more passive file locking strategy.) On the surface, this issue seemly looks like an issue with the TEE plug-in. However, in these file locking cases, we’ve found that other plug-ins are actually the culprit.

While we’ve been able to reproduce the issue commonly, we’ve finally got some conformation from codehaus.org that the Groovy plug-in many of you use will cause this issue. The root case is that they use the URLClassLoader from Sun/Oracle which won’t release locks on jar files when loaded to the classpath. Or something like that.

Here is a link to the issue we submitted. You can follow that for updates to the plug-in. Hopefully they have this fixed in an upcoming release. Until this time, the best way to work around the issue is to temporarily remove the Groovy Project Nature from your project, do Get Latest, then add the Groovy Project Nature back in.

Remove Groovy Nature = Right Click on Project | Groovy | Remove Groovy Nature

Add Groovy Nature = Right Click on Project | Configure | Convert to Groovy Project

1 comment:

zaibashar said...

Call us at We24Support E-mail support number at 1-866-978-0799 and Enhance your system functioning
and keep it clean with We24Support services.
E-mail Setup and support
email support