Am 2019-02-24 um 21:04 schrieb Florian Schmaus:
Assume a project which declares a dependency on libFoo version 1.0.0,
now libFoo also declares a dependency on libBar using a dynamic version
specifier [1.0, 2.0).
Now what I expect to happen is that Maven pulls in any, ideally the
latest available release, libBar 1.0 version artifact. What actually
happens is that Maven pulls in libBar 2.0-alpha5, which causes dynamic
linking issues. Gradle, OTOH, pulls in libBar 1.3 when it is used to
build the project.
I have created an example project, using the actual artifacts I
experience this issue with, to demonstrate the different behavior
between Maven and Gradle:
https://github.com/Flowdalic/maven-transitive-dynamic-dependency
The example project is configured to depend on Smack, an FOSS XMPP
client library, version 4.3.2. This Smack version declares jxmpp [0.6,
0.7) as a dependency.
$ mvn exec:java
…
Smack version: 4.3.2 (4.3.2-4.3 2019-02-22)
jxmpp version: 0.7.0-alpha5
ERROR: jxmpp version does not start with '0.6' as expected. :(
$ gradle run
…
Smack version: 4.3.2 (4.3.2-4.3 2019-02-22)
jxmpp version: 0.6.3
Is that by design or a (known) Maven issue?
This looks similar to MNG-6567. The issue is likely rooted in
org.apache.maven.artifact.versioning.ComparableVersion, but I cannot
tell wether this is by design or a bug. I think the whole issue is that
ComparableVersion does not know that these wellknown qualifiers do
denote non-GA versions.
This would require a change in behavior which will likely *not* happen
in Maven 3.x,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org