users@jersey.java.net

[Jersey] Re: jersey-test-framework some kind of dependency with commons-beanutils

From: John Yeary <johnyeary_at_gmail.com>
Date: Mon, 26 Mar 2012 08:43:20 -0400

I was trying to confirm where I read it, but the classloader for Maven
loads the classes in the order of appearance in the POM. The classloading
documentation explains the order of operation from system -> maven ->
plugin, but does not explicitly state the dependency order in the POM.

Your POM seems to indicate that the order is significant. I have
encountered the same thing in the past.

Anyone else want to weigh in?

John
____________________________

John Yeary
____________________________
*NetBeans Dream Team*
*President Greenville Java Users Group
Java Users Groups Community Leader
Java Enterprise Community Leader*

____________________________

<http://javaevangelist.blogspot.com/> <https://twitter.com/jyeary>
<http://www.youtube.com/johnyeary>
  <http://www.linkedin.com/in/jyeary>
<https://plus.google.com/112146428878473069965>
  <http://www.facebook.com/jyeary>
<http://feeds.feedburner.com/JavaEvangelistJohnYearysBlog>
  <http://netbeans.org/people/84414-jyeary>

"Far better it is to dare mighty things, to win glorious triumphs, even
though checkered by failure, than to take rank with those poor spirits who
neither enjoy much nor suffer much, because they live in the gray twilight
that knows not victory nor defeat."
-- Theodore Roosevelt



On Fri, Mar 23, 2012 at 3:41 PM, Marc Fernandez <marc.fernandez_at_playfish.com
> wrote:

> Hi team,
>
> Please see this strange issue.
> I prepared a simple maven project with a test.
> I have been able to locate the issue, but not able to find the actual
> maybe bug inside of jersey-test-framework.
> By changing the order of dependencies the test works or not. See the
> pom.xml comments.
>
> The dependencies in pom are as follows:
>
> <!-- With dependency before is working fine. Uncomment this dependency for
> testing.
> <dependency>
> <groupId>commons-beanutils</groupId>
> <artifactId>commons-beanutils</artifactId>
> <version>1.8.3</version>
> </dependency> -->
>
> <dependency>
> <groupId>com.sun.jersey.test.framework</groupId>
> <artifactId>jersey-test-framework</artifactId>
> <version>1.1.1-ea</version>
> <scope>test</scope>
> <exclusions>
> <exclusion>
> <groupId>commons-beanutils</groupId>
> <artifactId>*</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
>
> <!-- With dependency after is not working. Comment this dependency
> for testing. -->
> <dependency>
> <groupId>commons-beanutils</groupId>
> <artifactId>commons-beanutils</artifactId>
> <version>1.8.3</version>
> </dependency>
>
> Any idea about what could be the issue? For now it works just placing the
> dependencies in the right order, but I think it must be a better solution
> to solve this strange issue. I think there is some kind of hidden
> dependency. Maybe a Maven or Jersey bug, I am not sure.
>
> Thanks guys, good luck, have fun with this one. ;-)
>