I am trying to learn Cucumber using Maven + Eclipse. When trying to import the following I am getting the error respectively
import cucumber.org.junit.runner.RunWith;
import cucumber.api.junit.CucumberOptions;
CucumberOptions cannot be resolved to a type
RunWith cannot be resolved to a type
I have search through and read possible ways to resolved this but nothing worked for me.
POM Details:
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>4.2.0</version>
</dependency>
Version of Java/Exclipse/Maven
Eclipse IDE for Java Developers - Version: 2018-09 (4.9.0)
JAVA 11.0.1
Maven 3.6.0
Not sure what I am doing wrong if someone could help please.
Copyright Notice:Content Author:「Liza」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53195300/eclipse-error-cannot-be-resolved-to-a-type