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:
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?
It looks like the packaging type of the new maven project
is jar
. If so, you could change it to war
and try.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With