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
Instructor
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.
Instructor
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
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
Instructor
Ashish Thakur Replied on 08/08/2019
Is the issue resolved? Can we close this query?
Yes Thank Instructor for me this issue is resolved, please go head and closed this query.
Monal