Issue after running mvn test command in Module 10 Part 3 video when using maven-surefire-plugin | Selenium Forum
M
Monal Posted on 03/08/2019

Hi,

So I followed the lecture vidoe and after setting Pom.xml file as per the video I am getting error after running mvn test command please see attache screenshot

I was wondering what is the correct combination for running mvn with pom.xml using maven-surefire-plugin and which java version ?

So which java version ? should it be jre or jdk ?

maven-surefire-plugin which version ?

I tried with different combination of jdk and maven version but no luck getting my test to compile as per the lecture video in Module 10 Part 3

Can somebody help ?

Thank you,

Monal


A
Ashish Thakur Replied on 05/08/2019

You need to mention JDK 8 in your pom.xml This by default picks up JDK 5 which is obsolete.


M
Monal Replied on 06/08/2019

Hello Instructor,
                        I tried using your input by adding JDK 8 in my POM.XML but it did not worked attaching the output screen shot and Pom.xml file should I have to use different version of manve-surefire-plugin ?
 
-Monal

Responsive image

A
Ashish Thakur Replied on 07/08/2019

Please add the following lines after the version tag and before the dependencies tag

<properties>
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	<maven.compiler.source>1.8</maven.compiler.source>
	<maven.compiler.target>1.8</maven.compiler.target>
</properties>

The above part in the pom.xml will resolve the issue


M
Monal Replied on 08/08/2019

Thanks Instructor so I added the properties tag with source and target as per your instruction, but other than that I had to use maven surefire plugin version 2.22.1 to get it to compile and run

Thank you for  quick response Instructor,

Really enjoying your lecture videos please keep it up, Thanks

Monal


A
Ashish Thakur Replied on 08/08/2019

Is the issue resolved? Can we close this query?


M
Monal Replied on 09/08/2019

Yes Thank Instructor for me this issue is resolved, please go head and closed this query. 

Monal