Hi all,

we have pretty large project, successfully "mavenized" with Maven 2,
split into several module projects under one parent pom. We are using
m2eclipse plugin in Eclipse 3.5.

Project tree looks like:

parent/         (pom project)
 +-- lib-core/ (jar project)
 +-- lib-web/  (jar project, with shared webapp folder)
 +-- app1/     (war project)
 +-- app2/     (war project)
 +-- app3/     (war project)

parent project serves as agregator, its pom.xml defines common settings.
lib-web project depends on lib-core project, application projects depend
on both lib projects. All projects share same version, we are releasing
all applications at once through parent pom.

For everyday develepment we use SNAPSHOT postfix in version, dependecies
on module projects are specified as "project dependencies", so changes
in library projects in Eclipse cause rebuild dependent application
projects. Snapshots are disabled in our repository (Archiva).

But when I try setup WTP support through maven-eclipse-plugin goal
"eclipse:eclipse" and some necessary changes in Eclipse, publishing to
Tomcat creates only WEB-INF/lib folder with (correct) out-of-project
jar dependencies and WEB-INF/classes folder with CURRENT project
classes. No binaries from "project dependencies" lib-core and lib-web.

I have tried to change org.eclipse.wst.common.component file in many ways,
e.g. <dependent-module>, but without success.

Another weird thing: when I try to include resources from shared webapp
folder from lib-web project and use relative source-path like this:

   <wb-resource deploy-path="/"
                source-path="../lib-web/src/main/webapp"/>

publish can't copy subfolders content to Tomcat. Must explicitly specified:

   <wb-resource deploy-path="/btns"
                source-path="../lib-web/src/main/webapp/btns"/>
   <wb-resource deploy-path="/icons"
                source-path="../lib-web/src/main/webapp/icons"/>
   <wb-resource deploy-path="/imgs"
                source-path="../lib-web/src/main/webapp/imgs"/>
   ...

Please, what is the right WTP setup for multi modules configuration with "project
dependencies" and shared resources? Or is there any documentation for file
org.eclipse.wst.common.component?

I'm going little bit crazy... thank God debugging with Jetty works like a charm, either with shared resources (must hack with WebAppContext.setResourceBase() in
starter class).

Thanks a lot.

Martin Schayna

Reply via email to