> Nope it pick the *nearest* version. > > Direct dependency trumps transitive >
And to give the full picture, if different versions are declared at the same level in the dependency tree (typically via transitive dependencies when you don't have a direct dep), the first declaration wins. So, the order you declare your dependencies could actually have an impact in that case. /Anders > > > > > > > Regards, > > Curtis > > > > -- > > Curtis Rueden > > LOCI software architect - https://loci.wisc.edu/software > > ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden > > > > > > On Fri, Apr 21, 2017 at 6:18 PM, Jörg Wille <[email protected]> > wrote: > > > > > In a project 2 "different" versions of the same library A are used. > One, > > as > > > a direct dependency with a snapshot version *3.2.1-SNAPSHOT* and the > same > > > library - but with version *3.2.0* - is being used as a transient > > > dependency in yet another library B. So, the 2 dependencies of A only > > > differ in the minor version. > > > When I build/install this project only the 3.2.1-SNAPSHOT version of > > > library A gets downloaded. > > > Is this correct behaviour for maven since it evaluates the > 3.2.1-SNAPSHOT > > > to be compatible with the 3.2.0 release version or should maven > download > > > the 3.2.0 release version since it is explicit mentioned as a transient > > > dependency in the pom of a library B? > > > > > > -- > Sent from my phone >
