If you're using 2.2-SNAPSHOT of the assembly plugin, you should have quite a
few options for including the binaries of <modules>. This means that you
could, in theory, setup the assembly plugin to run once from the top level
project, and point it at a set of assembly descriptors, each containing a
different assembly permutation. However, there are two drawbacks to this
approach:

1. The improved ModuleSet processing for the 2.2-SNAPSHOT version is not
documented yet. It's on my TODO list, but I haven't completed it.

2. Because of a quirk with the way Maven processes multimodule builds, and
its effect on the assembly logic, you may have to call it in this way:

mvn package assembly:assembly

to ensure that the module artifacts are produced *before* the assembly
plugin tries to add them to the archive.

OTOH, you could create assembly-producing projects for each permutation, and
list the appropriate base/client-1/client-n as dependencies...which would
probably be the simplest solution using the 2.1 assembly plugin.

HTH,

John

On 11/17/06, Lee Meador <[EMAIL PROTECTED]> wrote:

A more "maveny" way IMHO would have a project for each thing you are
trying
to build. That would include the base, each client and each assembly.Tobuld
an assembly you go to its project folder and type:

mvn assembly:assembly

This goes against our built-in lazyness where we want to have as few
folders
full of stuff as possible. But it works well and organizes things well.

-- Lee

On 11/17/06, flyboy <[EMAIL PROTECTED]> wrote:
>
>
>
> Here is a question about maven assembly.  Maybe it is a best practice
> question.
>
>
> Say there is a Base project that provides common services.  Then there
are
> multiple projects (Client-1, Client-2,...) which use the common service.
>
> Say I want to build assemblies which include the Base and various
> different
> permutations of Clients.  Example: Assembly-1 contains Base, Client-1,
> Client-3.   Assembly-2 contains Base, Client-3, Client-4.  Assembly-3
> contains Base, Client-1, Client-2, Client-4.  and on and on....
>
>
> All clients depend on Base.   Each assemlbly would contain 1 or more
> clients.
>
>
> I think I will create an seperate project, AssemblyProy.  The pom would
> describe all clients as dependencies.  The pom would parameterize the
> assembly descriptor and the assembly name.  Each descriptor would
> represent
> a diffeferent combintation of Clients.   To build an assembly, would
run:
>
>
> mvn -Passembly=Assembly-1 assemble
>
>
>
> Is this THE WAY in maven?  If not, what is?
>
> If there currently isn't a WAY, is the above reasonable?  Are there
> alternatives?
>
> Thanks,
>
> John
>
> --
> View this message in context:
> http://www.nabble.com/assembly-permutations-tf2655047s177.html#a7406601
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>


--
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com


Reply via email to