Hi, 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 transitivity).
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*. HTH. Cheers 2013/6/21 testUser0001 <[email protected]> > 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: > http://maven.40175.n5.nabble.com/Maven-Mulit-Module-Project-as-Dependency-tp5760027.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Baptiste <Batmat> MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
