简体   繁体   中英

coordination versions of related libs when i add new lib in project

There is one lib for selenium org.seleniumhq.selenium: selenium-java : 2.53.1

org.seleniumhq.selenium: selenium-server : 2.44.0

Now I need to add selenium server dependency for my new tasks in this project, but within adding selenium server dependency I meet problem that there are not some classes(as example ' java.lang.NoClassDefFoundError: org/openqa/selenium/ImmutableCapabilities '), therefore I find in maven central modules that contains this classes and include them in project, but this modules has transitive dependencies that already exists in project(and have another versions)

key point is that transitive modules has not classes that I use in my first task related with selenium

How I may find true version for selenium server lib(and his transitive dependencies) that i could not try all combinations of libs versions

May be in gradle exist such function or exist separate tool or service for this

Add below dependency into Maven pom.xml as following:

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>3.11.0</version> 
</dependency>

you can change the version 3.11.0 to other, Maven will download all transitive dependencies for you.

You wanted class ImmutableCapabilities is neither in selenium-java.jar nor selenium-sever.jar . But in selenium-api.jar as following:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM