Search code examples
eclipsetomcatm2eclipse

Eclipse WTP / m2eclipse - can neither clean nor publish to tomcat


I'm working on a pretty complex project (Java / Spring / Maven multi-module) with WAR overlays in Eclipse Indigo Java EE (heavily using m2eclipse) on Ubuntu 11.10 / 64bit

All good till this morning: I cannot clean / publish to tomcat anymore:

Publishing failed
Could not delete <directory> May be locked by another process.

I can easily delete these files by hand (but still tomcat cannot publish), and I cannot find out which process might be locking it (linux: lsof <directory>)

I tried a sh..load of things in Eclipse: removed projects (works then), added again (same issue), deleted server config, deleted tomcat config, updated eclipse, started eclipse with -clean, moved server directory out of the plugin folder, rolled back the project to a branch that definitely worked the other day...

As as said: everything was good till yesterday. I found this issues here, with someone having the same problem lately. Googling around doesn't reveal much. Some guys had similar issues which they "fixed" by heavily deleting / recreating server configs. Tried that at least 10 times.

Same issues on a colleague's linux box - he set up his system yesterday and ran into it right away.

I found this bug-report of m2e-wtp which might be related.

Update: I'm pretty sure its the combination of WAR overlay and this build of Maven Integration for WTP: 0.15.1.20120208-1300 Actually trying to downgrade to 0.14...


Solution

  • It was the plugin in combination with a WAR overlay. Fixed it with this nightly build: http://download.jboss.org/jbosstools/builds/staging/m2eclipse-wtp-e37/all/repo/ (version 0.16.xxx)

    I saw that this URL http://download.jboss.org/jbosstools/builds/staging/m2eclipse-wtp-staging/all/repo/ provides version 15.2.xxx, which might be a better (first) try, as I have no idea what other issues will pop up with 16.xxx nightly...