maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baptiste MATHUS <>
Subject Re: Maven Mulit Module Project as Dependency
Date Sun, 23 Jun 2013 13:51:12 GMT

Though not the clean way I would recommend, with your current graph, only
adding moduleB in the foreign modules you want, and you're done. (since
moduleB depends on moduleA and on common, you'd get them all by

One other way would be to define an additional module which would be of
type pom, and would serve as a dedicated import pom. That pom would simply
depend on the modules you want to provide.

"Foreign" modules would then just depend on that last module (of type pom)
with *scope import*.



2013/6/21 testUser0001 <>

> Hi folks,
> somehow im stuck or dont know the best solution.. :(
> I have a multi module project (packaging pom in root pom) with 3 modules:
>  - commonModule
>  - moduleA
>  - moduleB
> All three are in the defined in the module block of the root pom.
> Each module has packaging jar, moduleA and moduleB depends on commonModule,
> moduleB also on moduleA
> Until here everything works fine (mvn clean install).
> Now my problems is that i want to use the all modules of the multimodule
> project as a dependency in an other maven project. I dont really want to
> add
> a dependency for each module of multimodule project in the other maven
> project.
> If i just declare in the other maven project (packaging war) the multi
> module as dependency the module jar dont get into the generated war file.
> Declare the modules of the multi module project as dependencies in the root
> pom of the multimodule projects leads to an cycle.
> How can i solve this issue? Have i to use assembly-plugin or is there
> another way without specifying each module as dependency
> thx alot
> cheers
> --
> View this message in context:
> Sent from the Maven - Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Baptiste <Batmat> MATHUS -
Sauvez un arbre,
Mangez un castor !

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