You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by flyboy <jj...@verizon.net> on 2006/11/17 18:05:34 UTC

assembly permutations


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.

Re: assembly permutations

Posted by flyboy <jj...@verizon.net>.
Lee,

Thanks.

OK.   I see that the idea of using a command line parameter to specify the
assembly-descriptor is not a 'best' or 'good' practice.

Regards,
John



Lee Meador-3 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.To
> buld
> 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
> 
> 
> -- 
> -- Lee Meador
> Sent from gmail. My real email address is lee AT leemeador.com
> 
> 

-- 
View this message in context: http://www.nabble.com/assembly-permutations-tf2655047s177.html#a7421505
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: assembly permutations

Posted by flyboy <jj...@verizon.net>.
John,

Thanks.

The functionality of 2.2-SNAPSHOT appears to have what I could use: point
the assembly plugin at a set of assembly descriptors, each containing a
different assembly permutation.  I guess this would generate a distinct
assembly for each  descriptor.

Hopefully, this functionality is not dependent on a multlevel project. 
Assume that the clients are not in the same project as the service module. 
The clients and service are all on unique release schedules - a multi-level
project constrains all modules on the same release schedule (if I'm wrong,
let me know, maybe I will post a new message on this question.)

Your "OTOH" is helpful, too.  I will explore both. 

In either case, because the artifacts to assemble are in seperate projects,
I need to create a special assembly project.


Regards,
John


John Casey wrote:
> 
> 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 <le...@leemeador.com> 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 <jj...@verizon.net> 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
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/assembly-permutations-tf2655047s177.html#a7421347
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: assembly permutations

Posted by John Casey <ca...@gmail.com>.
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 <le...@leemeador.com> 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 <jj...@verizon.net> 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
>
>

Re: assembly permutations

Posted by Lee Meador <le...@leemeador.com>.
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.To buld
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 <jj...@verizon.net> 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