Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353083 - Workspace resolution does not work with Tomcat webapps
Summary: Workspace resolution does not work with Tomcat webapps
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 04:28 EDT by Steve CLA
Modified: 2021-04-19 13:24 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve CLA 2011-07-26 04:28:57 EDT
I have a Spring webapp that references a library project, and Workspace Resolution is linking the two.

By default with no exporting of Maven dependencies, when the server starts up I get an error like the following, which is fair enough: 
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

In the webapp's build path, when I add Maven Dependencies to the export tab, there is no change. (This may be a bug too)

In the webapp's Deployment Assembly I can add the Maven Dependencies to be deployed to the server, but the above error is replaced with a compile time error:
Classpath Dependency Validator Message
  Invalid classpath publish/export dependency /xxxxx. Project entries not supported.


It seems that if I don't export the dependencies then it won't work, which is pretty much expected. But if I do export the dependencies, then eclipse complains about how the Workspace Resolution is referencing the library project.

Does anyone know a way around this? Any secret XML config I can use?


I am using Eclipse 3.7 with:
m2e - Maven Integration for Eclipse    1.0.0.20110607-2117   
org.eclipse.m2e.feature.feature.group    Eclipse.org - m2e

I have had some success with these features using eclipse 3.6 and the old sonatype m2eclipse, but it was always a bit flaky.


Thanks,

Steve
Comment 1 Igor Fedorenko CLA 2011-07-26 04:34:19 EDT
how do you launch tomcat? do you use wtp or something else?
Comment 2 Steve CLA 2011-07-26 04:36:02 EDT
I think it is WTP. I use the Java EE version of eclipse, and I add a new Server in the Servers tab and launch it from there.
Comment 3 Igor Fedorenko CLA 2011-07-26 05:59:29 EDT
Please report m2e/wtp related problems to https://issues.sonatype.org/browse/MECLIPSEWTP
Comment 4 Denis Roy CLA 2021-04-19 13:24:31 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/