views:

2187

answers:

2

I have a very large workspace with about 30 projects all together. I am using Eclipse 3.5 with m2eclipse. I check out of my subversion repository using the defaults in order to import the projects into my workspace.

I create a Tomcat server instance, and publish my web project to the tomcat server. Sounds easy enough.

The problem is that it does not appear as though the transitive dependencies for my other projects are being automatically added to the container, so when the container starts up I get classnotfound exceptions, etc.

I go into the web project's properties, and I notice that the Java EE Module Dependencies are NOT checked for some of the transitive dependencies. I check them, and everything seemingly works until I do a project clean build, when the Java EE Module Dependencies are automatically reset by eclipse, so I need to recheck them. This is maddening, and I was hoping there was some way to automatically pull in all of the transitive dependencies when working with Eclipse WTP.

I should mention, using standard maven build works just fine, and everything gets pulled in appropriately into the resulting WAR file. It just doesn't work so good with WTP for some reason.

+5  A: 

You need to make sure that you have "Maven integration for WTP" feature from m2eclipse installed. There is a simple tutorial available at http://docs.sonatype.org/display/M2ECLIPSE/WTP+mini+howto

What version of WTP and m2eclipse you are using? Check that dependency version declared in project's pom.xml matches with version declared in workspace project and make sure that workspace dependency resolution is enabled.

Also, you can try to run "Maven / Update project configuration" from the project popup menu and check that there is no errors on Maven console and in Eclipse's own log.

If the above won't help, try to reproduce issue on a smaller project and then submit it with a bug report

Eugene Kuleshov
Yes, I have the Maven Integration for WTP installed, and I've been through that tutorial. I have the same issue.
noplay
+1, worked like a charm.
Leonel
Howto has been moved to: https://docs.sonatype.org/display/M2ECLIPSE/WTP+mini+howto
Todd Owen
Dude... thanks!
Pablo Cabrera
+1  A: 

It appears as though the latest version of m2eclipse (.99x) solves all of my issues.

noplay