0

Hi All anyone could help me? I faced an issue when Itried running using Maven command line mvn test', based on issue report , the issue due to webdriver dependency 5.4.1 version.

Java that I used "11 version"

Below are dependencies I use :


<dependency>
 <groupId>io.github.bonigarcia</groupId>
 <artifactId>webdrivermanager</artifactId>
 <version>5.4.1</version>
 </dependency>
<dependency>
 <groupId>org.seleniumhq.selenium</groupId>
 <artifactId>selenium-java</artifactId>
 <version>4.11.0</version>
 </dependency>
<groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-compiler-plugin</artifactId>
 <version>3.6.2</version>
 <configuration>
 <source>1.8</source>
 <target>1.8</target>
 </configuration>
 </plugin>
 <plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-surefire-plugin</artifactId>
 <version>2.20</version>

screenshot error

i tried running my selenium using maven command line,

soundflix
3,13312 gold badges19 silver badges39 bronze badges
asked Jan 18, 2024 at 4:30

1 Answer 1

0

You have to change the source/target versions for your maven-compiler-plugin, it should be 11, not 1.8:

<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-compiler-plugin</artifactId>
 <version>3.6.2</version>
 <configuration>
 <source>11</source>
 <target>11</target>
 </configuration>
</plugin>

Provided dependencies/plugins are poorly formatted in the original question, I believe that the mentioned plugin is located inside of the /build/plugins

answered Jan 18, 2024 at 6:59
Sign up to request clarification or add additional context in comments.

5 Comments

thanks for the suggestion , however after changed the target version to 11. i facing this issue, could you help me ? [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project logislyAT: Fatal error compiling: invalid target release: 11 -> [Help 1]
@user23261610, can you check the Java version that is installed in your system? (java -version from CMD). And also check the SDK version in your IDE
this my java version = java version "11.0.16" 2022年07月19日 LTS and this the sdk on my IDE = oracle openJDK version 11.0.16
@user23261610, can you also check the maven java version? See this stackoverflow.com/a/63155672/23182657
Hi sashkins, issue has been fixed and thanks for helping my issue

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.