users@jersey.java.net

Re: [Jersey] maven mixes jars?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 11 Dec 2009 11:36:48 +0100

On Dec 10, 2009, at 10:21 PM, Roger Pack wrote:

>> Do you have a dependency on an artifact, let say X, which depends
>> on jersey 1.0.2? And besides that you have an explicit dependency
>> on jersey-... 1.1.4.1
>
> Explicitly adding a dependency to a higher version of jersey-client
> [1.1.4] however does update it.
>
> [INFO] +- com.sun.jersey:jersey-client:jar:1.1.4:test (scope not
> updated to compile)
> [INFO] | \- com.sun.jersey:jersey-core:jar:1.1.4:test
> [INFO] +- com.sun.jersey:jersey-test-framework:jar:1.1.4:test
> [INFO] | \- org.glassfish.embedded:glassfish-embedded-all:jar:3.0-
> Prelude-Embedded-b14:test
>
> so it's like...sometimes it wants to prefer a higher transitive
> dependency version, sometimes not? Since jersey-test-framework 1.1.4
> already has a dependency on client 1.1.4, I wonder why maven seems to
> disregard that dependency for a different one...maybe it chooses the
> "closest" dependency as most important, for version numbering?
>

I am not sure. I find that maven versioning can get rather mysterious,
and it is not very well documented. As the other Paul says probably
best to be explicit.

Paul.