On Dec 10, 2009, at 5:44 PM, Roger Pack wrote:
> Situation.
>
> Within a maven module, I have a dependency on an artifact that
> [through its children dependencies] relies on jersey-1.0.2
>
> I then add a dependency to jersey-test-framework 1.1.4
>
> When I run my tests, I get java.lang.NoClassDefFoundError:
> com/sun/jersey/core/util/FeaturesAndProperties
>
> Looking at the jars maven actually ends up using, it appears to be
> using
> jersey-test-framework 1.1.4
> jersey-server 1.1.4
> jersey-client 1.0.2
> jersey-core 1.0.2
>
> where the FeaturesAndProperties class is found in jersey-core 1.1.4
> [not 1.0.2].
>
> If I add an explicit dependency on jersey-client 1.1.4, jersey-core
> 1.1.4 is also used.
>
> Anybody know if this is expected/what is going on here?
That is definitely not expected. The module dependencies in a Jersey
pom file that refer to Jersey dependencies always utilize the same
version.
I actually do not see how this can occur unless unless your local repo
is somehow corrupted?
The pom file for the 1.1.4 jersey-test-framework has the following
Jersey-based dependencies:
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>${project.version}</version>
</dependency>
Paul.
> Shouldn't it
> choose the highest version required, by default?
> Thanks.
> -r
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>