I am having problem with Eclipse
using Maven
. I am getting
package org.assertj.core.api
does not exist
even though I am specifying it in my pom.xml
, as version 3.6.2 while using JDK 1.8.
How to overcome it ?
mvn clean install
is failing.
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project com.transunion.qa.datahub.ui.java.bdd.serenity: Compilation failure: Compilation failure:
[ERROR] /Users/pnutala/eclipse-photon-workspace/com.transunion.datahub.ui.qc.java.bdd.serenity/src/main/java/com/transunion/qc/steplibrary/datahub/DeCoherentUser.java:[7,35] package org.assertj.core.api does not exist
[ERROR] /Users/pnutala/eclipse-photon-workspace/com.transunion.datahub.ui.qc.java.bdd.serenity/src/main/java/com/transunion/qc/steplibrary/datahub/DeCoherentUser.java:[7,1] static import only from classes and interfaces [ERROR] -> [Help 1]
Tried Mvn clean install
, and verify
unsuccessfully.
import static org.assertj.core.api.Assertions.assertThat;
@Step
public void landedOnListPage(String expectedTotle) {
assertThat(currentListPage.getTitle()).containsIgnoringCase(expectedTotle);
It got solved very trivially, by removing the 'test' scope in the pom file for the dependency(this is what I remember after few days!!)