users@jersey.java.net

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

From: Marc Fernandez <marc.fernandez_at_playfish.com>
Date: Fri, 23 Mar 2012 19:41:30 +0000

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. ;-)