citrusframework / citrus

Framework for automated integration tests with focus on messaging integration
https://citrusframework.org
Apache License 2.0
457 stars 134 forks source link

Maven pom needs to declare dependency on guava-24 #365

Closed PH0lder closed 6 years ago

PH0lder commented 6 years ago

The Selenium POM needs to properly declare a dependency on guava so that others don't have failing code when they have an older version of guava in their build. Maven can't do dependency resolution if the dependencies are not properly made explicit.

Unsure if it matters, but my in my particular case, I am using the shade plugin to make an "uber" jar and I had guava 21 in my dependencies and my build worked fine, but the code failed when run with the issue reported in #294 ... the inability to find SimpleTimeLimiter.

I am otherwise including:

    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-chrome-driver</artifactId>
      <version>3.11.0</version>
    </dependency>
    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-server</artifactId>
      <version>3.11.0</version>
    </dependency>

and doing

System.setProperty("webdriver.chrome.driver", "C:\\Dev\\chromedriver.exe");

with the latest version of chromedriver.exe ( ChromeDriver 2.38 ) from https://sites.google.com/a/chromium.org/chromedriver/ to drive Chrome 66.0.3359.117.

and then when I start selenium I am doing

final WebDriver driver = new ChromeDriver();

My code has been unchanged, and working for some time, until I updated to the newer version of Selnium (I previously had been using 3.4 until I switched to 3.11 and this issue popped up.)

PH0lder commented 6 years ago

Oh jeez LOL... too tired... and added this issue to the completely wrong project apparently. (Not that the issue isn't relevant to your users, but probably it's not something you can fix.) Sorry about that.

melihsancak commented 6 years ago

did you fix this error i had same error dude

PH0lder commented 6 years ago

Yes, it can be fixed as suggested in the title. You need to add Google Guava v24 or later to your dependencies.

I had gauva 21 in my dependency management, and I changed it to 24 and that fixed the issue.

     <!-- dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>21.0</version>
      </dependency -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>24.1-jre</version>
      </dependency>
melihsancak commented 6 years ago

actually i added dependciies already, i am taking same mistakes.

com.google.guava guava 24.1-jre
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.11.0</version>

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

<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>3.8.1</version>
  <scope>test</scope>
</dependency>

<dependency>
     <groupId>org.testng</groupId>
     <artifactId>testng</artifactId>
     <version>6.8</version>
     <scope>test</scope>
</dependency>
com.google.code.gson gson 2.8.2