Re: understanding maven version resolution: minor and snapshots
Also: The command mvn dependency:tree may be your rescue, look for entries marked as conflicting. - Erik 2017-04-22 9:31 GMT+02:00 Anders Hammar: >> 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 >> 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 >> - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: understanding maven version resolution: minor and snapshots
> 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> 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 >
Re: understanding maven version resolution: minor and snapshots
On Sat 22 Apr 2017 at 00:21, Curtis Ruedenwrote: > Hi Jörg, > > As far as I know, Maven has no notion of "major" vs. "minor" vs. "patch" > versions in the style of e.g. SemVer. > > It simply judges which version is the newest via its algorithm, and uses > the newest, since it is assumed that a dependency on e.g. 3.2.0 means > "version must be at least as new as 3.2.0". Nope it pick the *nearest* version. Direct dependency trumps transitive > > > 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 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
Re: understanding maven version resolution: minor and snapshots
Hi Jörg, As far as I know, Maven has no notion of "major" vs. "minor" vs. "patch" versions in the style of e.g. SemVer. It simply judges which version is the newest via its algorithm, and uses the newest, since it is assumed that a dependency on e.g. 3.2.0 means "version must be at least as new as 3.2.0". 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 Willewrote: > 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? >
understanding maven version resolution: minor and snapshots
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?
maven version resolution for x.y.z-blah-3 and x.y.z
for the same groupID and artifactID how will the following versions be resolved in a range? The x.y.z is pretty simple based on x.y.z x.y.z-blah x.y.z.blah x.y.z.blah-3 x.y.z.blah-2 x.y.z-blah-3 = '-' vs '.' x.y.z-blah-2 = '-' vs '.' Thank you - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven version resolution
Hello again, I have a doubt here regarding Version resolution for extensions and plugins. When I omit the version for plugins, Maven resolves it to the Latest version right? And does that happen for Extensions too? Because I have a Pom here that users wagon-ssh-external as an extension and It DOESN'T specifies a version. When I build using the command line (e.g. mvn install) everything work fine. However I tried today the new M2Eclipse plugin and before that the Q4Eclipse plugin. Both of them complains that the version for wagon-ssh-external is missing. So my question is: Does this LATEST resolution exists for extension when I omit the version? Thanks a lot!
RE: Maven version resolution
It only applies to plugins. Extensions and dependencies MUST have a version declared somewhere...either in the extension/dependency or dependencyManagement (I'm not sure if this applies to extensions) -Original Message- From: Felipe Kamakura [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 19, 2008 4:56 PM To: Maven User List Subject: Maven version resolution Hello again, I have a doubt here regarding Version resolution for extensions and plugins. When I omit the version for plugins, Maven resolves it to the Latest version right? And does that happen for Extensions too? Because I have a Pom here that users wagon-ssh-external as an extension and It DOESN'T specifies a version. When I build using the command line (e.g. mvn install) everything work fine. However I tried today the new M2Eclipse plugin and before that the Q4Eclipse plugin. Both of them complains that the version for wagon-ssh-external is missing. So my question is: Does this LATEST resolution exists for extension when I omit the version? Thanks a lot! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]