users@jersey.java.net

Re: [Jersey] maven mixes jars?

From: Paul Brown <prb_at_mult.ifario.us>
Date: Thu, 10 Dec 2009 09:40:49 -0800

Try using the Maven dependency plugin to see which artifact is
including which transitive dependencies:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>

And then

            mvn dependency:tree

-- Paul

On Thu, Dec 10, 2009 at 8:44 AM, Roger Pack <rogerdpack_at_gmail.com> 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?  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
>
>



-- 
Paul Brown
Multifarious, Inc.
http://mult.ifario.us