You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Aliaksandr Radzivanovich <ar...@gmail.com> on 2007/02/14 19:12:54 UTC

Assembly plugin in a multimodile project

How is it possible to make an assembly in a multi module project? I'm
sure this could be pretty easy, but I get a lot of problems with this
task.
Suppose I have two modules in my project: module1 and module2, and the
later depends on the former.
When I execute command 'mvn assembly:assembly', maven compiles first
module successfully. But when it proceeds to the second module, maven
complaints with error that the module1 dependency cannot be resolved.
This is because assembly plugin does not install module artifacts to
the local repository.
Sure, I can execute command  'mvn install assembly:assembly', but this
one takes too much time because it compiles the whole project and
executes unit tests twice: first when installing, then when
assembling.
I would prefer if maven would compile, test, package and assemble the
whole project in one round. Is this possible?
Thanks.

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


Re: Assembly plugin in a multimodile project

Posted by Régis Décamps <de...@users.sf.net>.
On 2/14/07, Aliaksandr Radzivanovich <ar...@gmail.com> wrote:
>
>
> Suppose I have two modules in my project: module1 and module2, and the
> later depends on the former.
> When I execute command 'mvn assembly:assembly', maven compiles first
> module successfully. But when it proceeds to the second module, maven
> complaints with error that the module1 dependency cannot be resolved.
> This is because assembly plugin does not install module artifacts to
> the local repository.
> Sure, I can execute command  'mvn install assembly:assembly', but this
> one takes too much time because it compiles the whole project and
> executes unit tests twice: first when installing, then when
> assembling.
> I would prefer if maven would compile, test, package and assemble the
> whole project in one round. Is this possible?
>
> I imagine you can create a 3rd project (project3), which depends on
project1 and project2, and has the assembly definition.

As such, your assemblage process consists in:
project1 -> mvn install
project2 -> mvn install
project3 -> mvn assembly:assembly

Can this work for you?
-- 
Régis
<http://regis.decamps.info/>