You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Siegmann Daniel, NY" <Da...@fja-us.com> on 2007/05/23 20:34:44 UTC

[M2] Dependency Management transitivity

I know dependency management is inherited from parents, but is it also
used when the project is declared as a dependency of another project?

For example, lets say I have a dependency graph D->C->B->A. B depends on
A-1. C's dependency management section is set to use A-2. Assuming D
does not declare A in either its dependency or dep. management sections,
will it use A-1 or A-2?

I read through the relevant guide[1], but I did not find an answer to
this question.

[1]
http://maven.apache.org/guides/introduction/introduction-to-dependency-m
echanism.html

--
Daniel Siegmann
FJA-US, Inc.
512 Seventh Ave., New York, NY  10018
(212) 840-2618 ext. 139

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


Re: [M2] Dependency Management transitivity

Posted by Wayne Fay <wa...@gmail.com>.
IIRC, Maven will use the "nearest" version. In this case, if you're
building D, C is closest which means A-2 will win. (If you test and
find this is not the case, please reply back so we can perhaps analyze
your poms a little more closely.)

Ideally you'd declare a direct dependency on A (A-1 or A-2) in D to
guarantee a specific version.

Wayne

On 5/23/07, Siegmann Daniel, NY <Da...@fja-us.com> wrote:
> I know dependency management is inherited from parents, but is it also
> used when the project is declared as a dependency of another project?
>
> For example, lets say I have a dependency graph D->C->B->A. B depends on
> A-1. C's dependency management section is set to use A-2. Assuming D
> does not declare A in either its dependency or dep. management sections,
> will it use A-1 or A-2?
>
> I read through the relevant guide[1], but I did not find an answer to
> this question.
>
> [1]
> http://maven.apache.org/guides/introduction/introduction-to-dependency-m
> echanism.html
>
> --
> Daniel Siegmann
> FJA-US, Inc.
> 512 Seventh Ave., New York, NY  10018
> (212) 840-2618 ext. 139
>
> ---------------------------------------------------------------------
> 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