I'm having a similar requirement (kind of ear overlay feature). I agree with
sharing the dependencies, however you still have to repeat the ear
configuration (context-roots mappings etc.) if you have 2 different ears.

My use case is the following :
- for development we use an ear with a few wars
- for later phases (qa, prod...), we include extra wars (legacy stuff, no
development is done on it)

When I'm talking about *extra* wars, I mean about 50 wars so it is really an
overhead if we include them for development.

Ideally, in the production ear, I would declare a dependency to the
development ear, and add the extra wars. Ideally, the ear plugin would pick
up the application.xml from the ear dependency, and append the new wars
declared as dependencies.

Cheers,

Vincent

2010/10/25 Stephane Nicoll <stephane.nic...@gmail.com>

> Are the two others ears built with Maven as well? If so, I would try to
> share the dependencies between 1&2 and 3 somehow and rebuild the whole EAR
> instead of merging it.
>
> You could use something like the dependency plugin to unpack the dependency
> and excluding some files but there's nothing that will generate the
> application.xml for you. Looking at it from a distance, adding exclude on
> *files* is worse than trying to get a common dependency tree between your
> three projects.
>
> HTH,
> S.
>
> On Sun, Oct 24, 2010 at 4:21 PM, Varsha Hardikar
> <vhardi...@cybersource.com>wrote:
>
> > I am doing a project where I have to build an ear file (lets call it
> EAR3)
> > from a combination of two other ears (EAR1 and EAR2).
> >
> > EAR3  will have some libraries and war files that are copied from EAR1
> and
> > EAR2.
> > Additionally, I want to remove some jars from the libraries and war files
> > from EAR3 and generate a META-INF/application.xml and make changes to it.
> >
> > I was looking at two approaches 1) Maven assembly plugin 2) ant
> >
> > Has anyone done anything like this or guide me to what the best approach
> > would be.
> >
> >
> > Regards
> > Varsha
> >
> >
>

Reply via email to