The problem I have when I run this, I have two options -

1 - run from within the child module directory and make sure that all
the modules this child depends on have been jarred and installed into my
local repository.
2 - run from the top parent pom level and I wind up with an error as it
doesn't understand what target/lib is in relation to the top level

What are people doing in this situation? 

-----Original Message-----
From: John Casey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 06, 2006 11:06 AM
To: Maven Users List
Subject: Re: building assemblies from the top level project directory

If you bind in the assembly:attached mojo using a profile, the release
engineers can use something like "-P makeAssembly" in the command line
to
activate it and cause an assembly archive to be created.

One word of warning, however: if your top-level POM is the parent of the
sub-modules (declared in their <parent/> sections), and your assembly
needs
to include module jars, you're probably better off just running
assembly:assembly. The reason for this is sort of subtle:

When you run a multimodule build, the projects are sorted in order of
interdependency. This is to ensure that modules which depend on other
modules will have access to those binaries when they need them.  The
trick
is that the parent is factored into that equation, meaning that if all
modules inherit from the parent POM, the parent  POM will be built
first. If
the assembly:attached mojo is bound to this parent POM, it will run
before
any of the modules are built...so their binaries will not yet be
available.

This is a lifecycle implementation issue that we're planning to resolve
for
the 2.1 release, sometime this fall.

I know this is probably a lot more information than you were looking
for,
but that scenario causes a lot of trouble with people. :-)

Cheers,

John

On 6/6/06, EJ Ciramella <[EMAIL PROTECTED]> wrote:
>
> This is still two stages, there's no way to do this in a single pass?
>
> Not everyone will WANT to build up the tar, just release engineering.
>
> -----Original Message-----
> From: Edwin Punzalan [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 05, 2006 9:23 PM
> To: Maven Users List
> Subject: Re: building assemblies from the top level project directory
>
>
> You can put the goal assembly:attached inside the application
directory
> so that it always generates the assembly whenever it is built (either
> from the projectname dir or from the application dir).  Or you can
even
> put it inside a profile so you can just activate the profile when you
> can to create the assembly.
>
> or if you want... use the -f operator in mvn and point to your
> application pom.
>
>
> Hope that helps.
>
>
> ^_^
>
>
>
> EJ Ciramella wrote:
> > If I have a structure like this:
> >
> > C:\work\projectname
> >
> > And have three modules:
> >
> > C:\work\projectname\utils
> > C:\work\projectname\someproj
> > C:\work\projectname\application
> >
> > The only item that has an assembly is the actual application.  Is
> there
> > some way to build that assembly from the projectname directory, or
do
> I
> > have to run assembly:assembly from the application directory every
> time?
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to