You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julien HENRY <he...@yahoo.fr> on 2006/09/21 17:59:14 UTC

Problem with conflicting classes in classpath

Hi,

I have a conflict with 2 versions of Jetty. The first one is a dependency of Selenium RC Server (Jetty 5x), and I'm using Jetty 6 for my tests. As soon as I add the Selenium Server dependency in my pom, I get strange error.

How can I solve this issue ?

Thanks

Julien


Re : Problem with conflicting classes in classpath

Posted by Julien HENRY <he...@yahoo.fr>.
The problem is a bit more complexe as Selenium RC Server uses Jetty 5.x

In fact I only need to automatically run Selenium Server when my application, and I need to run Jetty 6 server before my test cases. I'm using a JUnit TestSetup to run Jetty 6 only one time, and it works fine. If I run manually Selenium Server in another JVN, it works fine.

But as soon as I try to put Selenium Server in my pom as a dependency, I get errors at runtime.

In fact, I would like Maven download selenium server in order to always have correct version, but I don't really need it in the classpath, as I can run something like execute("java -jar $M2_HOME/repository/org/openqa/selenium/server/selenium-server-XX.jar");

Do you know if it's possible ?

----- Message d'origine ----
De : Lee Meador <le...@leemeador.com>
À : Maven Users List <us...@maven.apache.org>; Julien HENRY <he...@yahoo.fr>
Envoyé le : Jeudi, 21 Septembre 2006, 7h17mn 30s
Objet : Re: Problem with conflicting classes in classpath

If Selenium RC Server will run with Jetty 6 you may be able to add an
exclusion to your dependency on Selenium. Here is an example from a pom of
mine:

            <dependency>
                <groupId>jmock</groupId>
                <artifactId>jmock-cglib</artifactId>
                <version>1.0.1</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>cglib</groupId>
                        <artifactId>cglib-full</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

Now, this is "test" but the principle is the same. I need JMock (cglib) in
my application but I don't want cglib-full so I exclude it. What I want is
cglib-nodep BTW so I have to add that dependency in myself.

Some other messages recently have noted that there are sometimes issues
related to exclusions in Maven 2.0.4 for which fixes exist but are not
released.

-- Lee


On 9/21/06, Julien HENRY <he...@yahoo.fr> wrote:
>
> Hi,
>
> I have a conflict with 2 versions of Jetty. The first one is a dependency
> of Selenium RC Server (Jetty 5x), and I'm using Jetty 6 for my tests. As
> soon as I add the Selenium Server dependency in my pom, I get strange error.
>
> How can I solve this issue ?
>
> Thanks
>
> Julien
>
>
>


-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com





Re: Problem with conflicting classes in classpath

Posted by Lee Meador <le...@leemeador.com>.
If Selenium RC Server will run with Jetty 6 you may be able to add an
exclusion to your dependency on Selenium. Here is an example from a pom of
mine:

            <dependency>
                <groupId>jmock</groupId>
                <artifactId>jmock-cglib</artifactId>
                <version>1.0.1</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>cglib</groupId>
                        <artifactId>cglib-full</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

Now, this is "test" but the principle is the same. I need JMock (cglib) in
my application but I don't want cglib-full so I exclude it. What I want is
cglib-nodep BTW so I have to add that dependency in myself.

Some other messages recently have noted that there are sometimes issues
related to exclusions in Maven 2.0.4 for which fixes exist but are not
released.

-- Lee


On 9/21/06, Julien HENRY <he...@yahoo.fr> wrote:
>
> Hi,
>
> I have a conflict with 2 versions of Jetty. The first one is a dependency
> of Selenium RC Server (Jetty 5x), and I'm using Jetty 6 for my tests. As
> soon as I add the Selenium Server dependency in my pom, I get strange error.
>
> How can I solve this issue ?
>
> Thanks
>
> Julien
>
>
>


-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com