Incompatible library version selenium / guava

╄→尐↘猪︶ㄣ 提交于 2019-12-23 14:38:14

问题


My app has a hard dependency on com.google.guava:guava:23.3 or superior

+--- com.github.ben-manes.caffeine:guava:2.6.0
|    +--- com.github.ben-manes.caffeine:caffeine:2.6.0
|    \--- com.google.guava:guava:23.3-jre (*)

But I am also using org.seleniumhq.selenium:selenium-java:3.0.1 which is incompatible with guava versions > 22.0 as discussed here:

https://github.com/SeleniumHQ/selenium/issues/4381

I am pretty new to Java, what is the best course of action here ?

I have looked into class loaders but that looks like a pretty deep rabbit hole.


回答1:


As you have a hard dependency on com.google.guava:guava:23.3 using org.seleniumhq.selenium:selenium-java:3.0.1 may put you on cross roads. But Selenium Release Notes clearly mentions the following guava dependencies :

  • Selenium v2.49.0 : Bump guava to version 19

  • Selenium v3.1.0 : Requires an update to the latest guava version 21.0

  • Selenium v3.5.0 : Bump guava to version 22.

  • Selenium v3.5.1 : Bump guava to version 23.

  • Selenium v3.12.0 : guava-23.6-jre

So Selenium v3.12.0 have got guava-23.6-jre which clearly fits to your requirement.



来源:https://stackoverflow.com/questions/50284776/incompatible-library-version-selenium-guava

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!