Hi everyone,

I have project A as a web project (meaning its a Maven Project created as
maven-archetype-webapp). It consists of classes and resources (jsps for
example). I package it as a WAR using m2eclipse run configuration named
mvn:package. I get a WAR and deploy it into my maven repository.

Afterwards I have a project B, also a web project.
I create a dependency on project A (dependency's type is war).
There's this problem of having project A in the same workspace while project
B is dependent on it, so I close project A.

Now, here are the problems:
1. Even though the dependency's scope is compile, I don't have access to the
classes of project A. That pisses me off - I assumed that must be the whole
thing about being dependent on a war in compile time. To work it around, I
can create a jar file of project A and put it in the maven repository, and
then create another dependency in project B on the jar of project A. That
would suck, though...
2. When I deploy project B to my tomcat using eclipse, I don't get anything
from within project A (not its classes nor its jsps). However, when I use
mvn:package to create a WAR of project B, I do get everything from within
project B. That means I can take that WAR and deploy it manually to the
tomcat, but that would suck too.
3. While developing, I want project B to depend on project A not via maven,
but simply as an eclipse project dependency. For this to work when I deploy
to tomcat, I also have to declare project A as 'Java EE Module Dependency'
in eclipse. That's not possible since project A is considered a Dynamic Web
Module, and eclipse doesn't allow 2 Dynamic Web Modules to be dependent on
each other.

Does anyone have solution?
The ideal situation would be declaring the maven dependency in project B,
and right away get the classes of project A to my classpath so that I can
access them, while also having the whole project A packaged with project B
when I use eclipse's simple deploy to tomcat.

Some details:
I work with Eclipse 3.4, m2eclipse 0.9.6 (+Maven Integration for WTP) and
tomcat 5.5.
I hope the information suffices.

Many thanks in advance,
Daniel
-- 
View this message in context: 
http://www.nabble.com/Maven-%2B-Eclipse-%2B-Tomcat-%2B-war-dependencies-tp21240154p21240154.html
Sent from the Maven Eclipse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to