maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Casey" <casey.joh...@gmail.com>
Subject Re: building assemblies from the top level project directory
Date Tue, 06 Jun 2006 15:05:57 GMT
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 <ejciramella@upromise.com> 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:epunzalan@exist.com]
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message