I think you have stumbled onto why we use profiles.  I was going to say that
what you have will work but you can endup with an explosion in the number of
artifacts.  If you have lots of wars/ears/ejbs and they all run in lots of
containers, that can add up to lots of projects and build time.

Using profiles we put each war, ejb, ear in a single module and then put the
container specific stuff behind a profile, where each profile adds a
classifier to the output artifact.  Then subsequent builds consume the same
artifact w/ classifier.

It is a bit complex, so I'm not saying its the silver-built, but it seems to
work.  I think it excels where you don't always want to build for all
containers.  For us we find developers tend to work with just one so they
don't want to wait for all the others to build, etc.  I think you have the
other case where you need them all.

-Dave

On Tue, Jan 19, 2010 at 1:06 PM, <[email protected]> wrote:

> Dang, the problem just compounded.  Being that this is a multi-module
> project there are several EJBs etc... modules that have different files for
> the web servers.  I would prefer not to have different EJB projects just for
> the web server.  Is this possible, I didn't see an overlay option for the
> ejb plugin.
>
> Thanks,
>
> David
>
> -----Original Message-----
> From: Manfred Moser [mailto:[email protected]]
> Sent: Tuesday, January 19, 2010 12:43 PM
> To: Maven Users List
> Subject: Re: Multiple Artifacts Question
>
> I have done the two approaches on bamboo.. and yes, i believe the cleanest
> approach is to use separate projects for each appserver.
>
> On advantage of an overlay is that you can do it with a war (and maybe ear)
> that is not part of your build. E.g. I modified JasperServer war and added
> more stuff to it that way..
>
> manfred
>
>
> On Tue, 19 Jan 2010 10:44:00 -0700, David Hoffer wrote
> > That shouldn't be a problem...we have the same
> > requirements...however we use TeamCity for CI.
> >
> > -Dave
> >
> > On Tue, Jan 19, 2010 at 10:29 AM, <[email protected]> wrote:
> >
> > > Thanks everyone for your answers.   I'll look into each method.  We are
> > > using Bamboo as a build server and the two issues are that 1, need to
> ensure
> > > that all version have the same source code revision and 2, we are using
> that
> > > Build Number plug-in and need to keep the build number the same for all
> > > varieties.
> > >
> > > Thanks,
> > >
> > > David
> > >
> > > -----Original Message-----
> > > From: Wayne Fay [mailto:[email protected]]
> > > Sent: Tuesday, January 19, 2010 11:13 AM
> > > To: Maven Users List
> > > Subject: Re: Multiple Artifacts Question
> > >
> > > > Yeah, I've used both approaches, overlays and profiles.  We generally
> use
> > > > profiles because they are faster, especially if you don't need to
> always
> > >
> > > I'd probably just create multiple ear artifact projects and include
> > > the Java EE target name in the artifactId eg my-app-weblogic. Then
> > > include your server-specific stuff in each ear project, and build all
> > > of them by building your project from the top/parent directory.
> > >
> > > Profiles and classifiers would certainly work, but I think that would
> > > potentially complicate your build a bit.
> > >
> > > Wayne
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
> > >
> > >
> > >
>
>
> Manfred Moser
> http://www.mosabuam.com/manfred
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>

Reply via email to