0

We have the following project setup:

Root (pom)
 |
 +-- s1: Service 1 (war)
 +-- s2: Service 2 (war)
 +-- lib: Shared Library for Service 1 + 2 (jar)
 +-- intf: Service 1 Interface POJOs

Each is a maven project with its own pom:

Root.pom:
...
<modules>
  <module>s1</module>
  ...
</modules>

And each subproject references it's parent project:

<parent>
   ....
</parent>

Maven compile/test targets work fine. But I'm messing up with the tomcat plugin, whenever I try to instantiate a locatl tomcat testing environment with:

mvn tomcat:run

It will only start one of the services (actually always the the first service in the <modules> section.

I would like to start both services, do you have similar experiences in your projects or any idea of how to make this in a nice way?

Thanks a lot!!

Patrick
  • 809
  • 3
  • 9
  • 21

1 Answers1

0

I would recomment to make a separate maven module which contains the definition for the tomcat plugin and use the two services as dependencies...or you can use the cargo-maven-plugin to define a configuration where you can start two services within a single tomcat instance...like in this example: https://github.com/khmarbaise/scms/blob/master/scms-it/pom.xml

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
  • I actually used the first recommendation from you: one maven plugin to rule them all (as a webservice) and it works like a charm. thanks! – Patrick Apr 24 '12 at 13:35