You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by is...@mpsa.com on 2007/03/06 11:20:40 UTC

[m2] dependency order in 2.0.5

Hello,

I'd like to have more information about the new way to resolve dependencies
in maven 2.0.5.

In the release notes, you write "...when two exist at the same depth in the
dependency graph, by matching the first encountered.".
Picking up the FIRST element means there's a sorted list somewhere... But
how are dependencies sorted in the parsing ? I've changed the order of
dependencies in the pom many times to test the behaviour, and I noticed
that nothing changed at all ! At the same depth, the dependency resolution
order shown in the log (with the -X option) is always the same. I guess
some kind of hash map may be used to store dependencies, and iterating on
this map always gives the exact same order each time ??

So I agree that this method will be totally determinist, but wouldn't it be
better to take the MOST RECENT version when you have two identical
artefacts at the same depth level ?
In this latest maven version, users have no way to influence on the
dependency to be used by ordering manually the items in the pom, so they're
forced to put these dependencies at a higher level in the graph, which will
unnecessarily increase the poms size...
What's your point of view about that ?

Thanks for your help !

Isabelle


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


Re: [m2] dependency order in 2.0.5

Posted by Thierry Lach <th...@gmail.com>.
I'm not sure about how maven does this, but "matching the first encountered"
does not necessarily imply anything sorted.

On 3/6/07, isabelle.guimiot@mpsa.com <is...@mpsa.com> wrote:
>
>
> Hello,
>
> I'd like to have more information about the new way to resolve
> dependencies
> in maven 2.0.5.
>
> In the release notes, you write "...when two exist at the same depth in
> the
> dependency graph, by matching the first encountered.".
> Picking up the FIRST element means there's a sorted list somewhere... But
> how are dependencies sorted in the parsing ? I've changed the order of
> dependencies in the pom many times to test the behaviour, and I noticed
> that nothing changed at all ! At the same depth, the dependency resolution
> order shown in the log (with the -X option) is always the same. I guess
> some kind of hash map may be used to store dependencies, and iterating on
> this map always gives the exact same order each time ??
>
> So I agree that this method will be totally determinist, but wouldn't it
> be
> better to take the MOST RECENT version when you have two identical
> artefacts at the same depth level ?
> In this latest maven version, users have no way to influence on the
> dependency to be used by ordering manually the items in the pom, so
> they're
> forced to put these dependencies at a higher level in the graph, which
> will
> unnecessarily increase the poms size...
> What's your point of view about that ?
>
> Thanks for your help !
>
> Isabelle
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>