You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by LECAN Damien <Da...@B2i.fr> on 2006/06/07 12:11:19 UTC

Assembly and multi-levels multi-modules

Hello,

I'm using maven-assembly-plugin with multi-modules projects, and it works fine for "flat" hierachy.
I mean for multi-modules projects as :

Parent
  +- Submodule1
  +- Submodule2

But for this kind of layout :

Parent:pom
  +- Submodule1:jar
  +- SubParent:pom
         +- Subsubmodule1:jar
         +- Subsubmodule2:jar

I am not able to build an assembly with all referenced modules (Submodule1, Subsubmodule1 and Subsubmodule2).
Moreover, assembly plugin tries to include module SubParent whereas it is a pom module !

How to assemble all my project ?
Is it possible to exclude all pom modules from assembly ? (without specifiying exclusion for each in assembly descriptor)

Thanks

Damien Lecan

--
Telematic Systems
B2i - Viveris Group France

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


Re: Assembly and multi-levels multi-modules

Posted by Gilles Scokart <gs...@hotmail.com>.

baerrach wrote:
> 
> 
> My file layout looks like:
> ROOT
> - pom.xml
> - module1
> - modulen
> - build
>   - pom.xml
> 
> Where the build/pom.xml will contain the assembly of everything that
> is needed from the other modules.
> 
> I don't think putting the assembly plugin and descriptor in the
> ROOT/pom.xml is correct as then it will be inherited by all the
> modules.  So the correct place to put together an aggregation is
> build/target.
> 
> Any one else doing this and have some hints?
> 
> 

If the inheritance is a problem, you can use the inherited tag when
configuring your plugin.

Gilles Scokart
-- 
View this message in context: http://www.nabble.com/Assembly-and-multi-levels-multi-modules-tf1747056.html#a5178340
Sent from the Maven - Users forum at Nabble.com.


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


Re: Assembly and multi-levels multi-modules

Posted by Barrie Treloar <ba...@gmail.com>.
> I think this is a really cool idea.... I tried to do it for my
> project but unfortunately I couldn't find a way to reference the
> assembly of the subModule in the moduleSet of the parent module.  The
> submodule assembly gets set as an 'attached' artifact and not the
> main one.. by the <binaries> tag in the moduleSet only supports the
> main modules.  If we could add the classifier's on this would work
> very well I think!

Did you find an answer to this question?

I am wanting to pull together our build so that we have everything
that is needed in one place for easy deployment: ear files, zips of
client applications, all the stuff I have previously assembled and is
stored in the repository.

In the assembly descriptor
- moduleSet doesn't appear to be the answer as it looks like this is
the modules from the pom.
- repositories looks like it could be, but the documentation is thin
and the code isn't helping me understand it any easier. All I've
managed to do is to get a copy of the poms and jars out of the
repository (not the assembled archives)

My file layout looks like:
ROOT
- pom.xml
- module1
- modulen
- build
  - pom.xml

Where the build/pom.xml will contain the assembly of everything that
is needed from the other modules.

I don't think putting the assembly plugin and descriptor in the
ROOT/pom.xml is correct as then it will be inherited by all the
modules.  So the correct place to put together an aggregation is
build/target.

Any one else doing this and have some hints?

Cheers
Bae

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


RE: Assembly and multi-levels multi-modules

Posted by LECAN Damien <Da...@B2i.fr>.
> > Not 100% sure on this, but what if you try to make 2 assemblies  
> > here? the first one for the subsub-modules (inside the subparent)
> > and the second one with the result of the subparent (=assembly of  
> > subsub-modules) and submodule?
> > Not sure on how to do this, but it seems kind of logical this way  
> > to me...
> 
> I think this is a really cool idea.... I tried to do it for my  
> project but unfortunately I couldn't find a way to reference the  
> assembly of the subModule in the moduleSet of the parent 
> module.  The  
> submodule assembly gets set as an 'attached' artifact and not the  
> main one.. by the <binaries> tag in the moduleSet only supports the  
> main modules.  If we could add the classifier's on this would work  
> very well I think!
I looked at the code and a kind of filter restricts the content of the reactor (in AbstractAssemblyMojo#getModulesFromReactor(MavenProject, boolean), with method isProjectModule(...)).

If I remove this filter, I get everything I need in my assembly. But this should produce issues in the special cases I think.

I think I will fill a new jira issue for that.

Damien Lecan

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


Re: Assembly and multi-levels multi-modules

Posted by Matt Brozowski <br...@opennms.org>.
On Jun 7, 2006, at 7:24 AM, Roland Asmann wrote:

> Not 100% sure on this, but what if you try to make 2 assemblies  
> here? the first one for the subsub-modules (inside the subparent)
> and the second one with the result of the subparent (=assembly of  
> subsub-modules) and submodule?
> Not sure on how to do this, but it seems kind of logical this way  
> to me...

I think this is a really cool idea.... I tried to do it for my  
project but unfortunately I couldn't find a way to reference the  
assembly of the subModule in the moduleSet of the parent module.  The  
submodule assembly gets set as an 'attached' artifact and not the  
main one.. by the <binaries> tag in the moduleSet only supports the  
main modules.  If we could add the classifier's on this would work  
very well I think!

Matt
________________________________________________________________________ 
___
Matt Brozowski, OpenNMS Maintainer			Main:	+1 919 812 4984
The OpenNMS Group, Inc.					Fax:		+1 503 961 7746
Email: brozow@opennms.org					URL:	http://www.opennms.com



RE: Assembly and multi-levels multi-modules

Posted by LECAN Damien <Da...@B2i.fr>.
> Not 100% sure on this, but what if you try to make 2 
> assemblies here? the first one for the subsub-modules (inside 
> the subparent)
> and the second one with the result of the subparent 
> (=assembly of subsub-modules) and submodule?
> Not sure on how to do this, but it seems kind of logical this 
> way to me...
Yes it is logical, but I have much more than 2 multi-modules levels .... I can't build an assembly for each level. 

Finally, I would need to merge all them at the end, and I don't know how I could do that.

Thanks

Damien

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


Re: Assembly and multi-levels multi-modules

Posted by Roland Asmann <Ro...@cfc.at>.
Not 100% sure on this, but what if you try to make 2 assemblies here? the first one for the subsub-modules (inside the subparent)
and the second one with the result of the subparent (=assembly of subsub-modules) and submodule?
Not sure on how to do this, but it seems kind of logical this way to me...

Sorry if I was of no help!

Roland



On Wednesday 07 June 2006 12:11, LECAN Damien wrote:
> Hello,
>
> I'm using maven-assembly-plugin with multi-modules projects, and it works
> fine for "flat" hierachy. I mean for multi-modules projects as :
>
> Parent
>   +- Submodule1
>   +- Submodule2
>
> But for this kind of layout :
>
> Parent:pom
>   +- Submodule1:jar
>   +- SubParent:pom
>          +- Subsubmodule1:jar
>          +- Subsubmodule2:jar
>
> I am not able to build an assembly with all referenced modules (Submodule1,
> Subsubmodule1 and Subsubmodule2). Moreover, assembly plugin tries to
> include module SubParent whereas it is a pom module !
>
> How to assemble all my project ?
> Is it possible to exclude all pom modules from assembly ? (without
> specifiying exclusion for each in assembly descriptor)
>
> Thanks
>
> Damien Lecan
>
> --
> Telematic Systems
> B2i - Viveris Group France
>
> ---------------------------------------------------------------------
> 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