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?
Thanks
- Florian
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]