You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Baptiste MATHUS <ml...@batmat.net> on 2009/11/04 11:06:28 UTC

Parent multimodule pom dependencyManagement block for defining versions of modules contained in the same multimodule project

Hi all,

Well, I tried to find a clear title. But it wasn't so simple :-). So I'll
describe my question below.
This is more a best practice question than a feasibility one. In fact, we
already use but feel not sure if this is correct.

We have a multimodule project that contains some modules.
Something like :


multimodule project (with unique version for all artefacts parent and
children) :
parent-pom
    project1/
    project2/ (depends on project1)
    project3/
    project4/
    ...

Then we have projects that :

   - use some of the projects above.
   - always inherit the parent-pom above that defines a dependencyManagement
   block


The question is :
Is there a problem to put project1, project2... in the parent-pom
dependencyManagement block of the parent-pom project ?

I think this could create kind of circularity (I know this is not a real
dependency). In fact, this would make project1,2... depend on parent-pom.
And in turn, parent-pom would kind of know those projects inside the depMgmt
block.

Do you see a problem doing that?

I hope I'm being clear.

Thanks for any answer.
Cheers.

-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Save a tree,
Eat a beaver!

Re: Parent multimodule pom dependencyManagement block for defining versions of modules contained in the same multimodule project

Posted by Jörg Schaible <jo...@gmx.de>.
Hi,

Baptiste MATHUS wrote at Mittwoch, 4. November 2009 11:06:

> Hi all,
> 
> Well, I tried to find a clear title. But it wasn't so simple :-). So I'll
> describe my question below.
> This is more a best practice question than a feasibility one. In fact, we
> already use but feel not sure if this is correct.
> 
> We have a multimodule project that contains some modules.
> Something like :
> 
> 
> multimodule project (with unique version for all artefacts parent and
> children) :
> parent-pom
>     project1/
>     project2/ (depends on project1)
>     project3/
>     project4/
>     ...
> 
> Then we have projects that :
> 
>    - use some of the projects above.
>    - always inherit the parent-pom above that defines a
>    dependencyManagement block
> 
> 
> The question is :
> Is there a problem to put project1, project2... in the parent-pom
> dependencyManagement block of the parent-pom project ?

No.

> I think this could create kind of circularity (I know this is not a real
> dependency).

As you said, only dependency declaration can generate circles.

> In fact, this would make project1,2... depend on parent-pom. 
> And in turn, parent-pom would kind of know those projects inside the
> depMgmt block.
> 
> Do you see a problem doing that?

No, we're doing this since years now.

> I hope I'm being clear.

Clear enough ;-)

- Jörg


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