You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Donald Ness <Do...@datatrak.net> on 2006/08/03 20:21:15 UTC

Multiple projects under 1 war

Why can't I create a parent project that's of war packaging? I have N
number of subprojects under a single parent pom. All N of those
subprojects are listed as modules. Under the parent pom I have 1
subproject that all the rest of the subprojects depend on (the "core")
at compile time. I want the parent pom to build all the N subprojects,
including the core, listed in it's modules section and merge them all
together in a single war.

This is proving to be very difficult since a war can't be a parent
pom... and the war overlay technique isn't working for me. Do I need to
write a custom plugin to do this?

Thanks,
Don

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multiple projects under 1 war

Posted by Wayne Fay <wa...@gmail.com>.
Here's how I do it:

project/pom.xml
modules: common, ejb, war, ear

project/common/pom.xml
parent: ../pom.xml
depends: none

project/ejb/pom.xml
parent: ../pom.xml
depends: common

project/war/pom.xml
parent: ../pom.xml
depends: common, ejb

project/ear/pom.xml
parent: ../pom.xml
depends: common, ejb, war

No custom plugin required. Just set the dependencies in your WAR to be
all your other subprojects.

Wayne

On 8/3/06, Donald Ness <Do...@datatrak.net> wrote:
> Why can't I create a parent project that's of war packaging? I have N
> number of subprojects under a single parent pom. All N of those
> subprojects are listed as modules. Under the parent pom I have 1
> subproject that all the rest of the subprojects depend on (the "core")
> at compile time. I want the parent pom to build all the N subprojects,
> including the core, listed in it's modules section and merge them all
> together in a single war.
>
> This is proving to be very difficult since a war can't be a parent
> pom... and the war overlay technique isn't working for me. Do I need to
> write a custom plugin to do this?
>
> Thanks,
> Don
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org