maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé BOUTEMY <>
Subject Re: Adding support for new dependency mediation strategy
Date Wed, 21 Aug 2013 17:34:42 GMT
Le mercredi 21 août 2013 10:37:40 Phillip Hellewell a écrit :
> On Wed, Aug 21, 2013 at 3:19 AM, Baptiste Mathus <> wrote:
> > Wondering: is this strategy still gonna choose the newest version
> > specified
> > even if I specify a version inside my pom? Or is it only gonna be used
> > between dependencies?
> The behavior we actually need and want most of the time is for it to
> pick the newest version, *even if there is a direct dependency from
> your pom*.
> > If the latter, I may agree it can be of interest.
> > But with the first I guess it would get crazy not being able to force the
> > version to be used.
> Yeah, I know what you mean, and I thought about this too.  It is true
> that every once in a while, you may really need to force it to use an
> older version (even though some dependency is using a newer version).
IIUC Baptiste point, the question is not about exceptionally forcing to the 
old release when 2 versions are "in conflict", but to choose the newer one of 
the two proposed versions vs using the newest in the repository (= the latest)
because latest in the repository would give a non-reproducible result

notice my quotes around "conflict" because it's not a conflict but a choice to 
operate between 2 proposed versions (I know internal term used is "conflict", 
but IMHO it's not the good term)
real conflict happen when version ranges are used (forced version, ie "[1.0]", 
being one case of range): and in that case of real conflict, there is a failure

IMHO, nearest is the best strategy because it let you decide: it's only an 
automatic strategy for usual cases, and if you're not happy with automatic 
transitive choice, you can configure the dependency in pom which will de facto 
create the nearest

I doubt configuration of a strategy per artifact is manageable: IMHO, if you 
want to manage things, dependencyManagement is your friend


Her vé

> That should be pretty rare, but it definitely could happen.
> My idea to solve this was to add support for a
> <forcever>true</forcever> in the <dependency> declaration.  Thoughts?
> Phillip
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message