I've just switched over to Eclipse Indigo from Helios, and I've run in to some bother when attempting to run a Maven-enabled web project on Tomcat 6 with WTP.
I'm experiencing the classic problem of Tomcat not seeing the Maven dependencies. In Helios, the workaround was to add the Maven dependencies to the Deployment Assembly via: Project properties -> Deployment Assembly -> Add 'Java Build Path Entries' -> Maven Dependencies
Unfortunately, the option of 'Java Build Path Entries' isn't being listed, only 'Folder' and 'Project'. I'm not sure if this is intentional, or if there's something wrong with my setup.
In an attempt to remove external factors, I'm using the following setup:
- Fresh installation of Eclipse Indigo (Mac)
- Fresh workspace
- m2e WTP Integration installed via Eclipse Marketplace
- Create new Maven project
- Add in some maven dependencies, plus some code to use them
- Convert project to faceted form
- Add 'Dynamic Web Module' facet
- Maven > Update Project Configuration
- Add to a Tomcat 6 Server
- Run on server
At this point, I see get ClassNotFoundException relating to my missing dependencies. If I run 'mvn war:war' and include the assembled 'WEB-INF/lib' directory in the project's Deployment Assembly, then of course the dependencies are correctly picked up - fine for a quick fix, but not ideal.
Most of the problems I've read about relating to similar issues has been down to a missing WTP integration module, but that doesn't appear to be the problem for me.
Am I doing something wrong?