我正在尝试从cmd安装mvn然后我开始编译文件,然后我收到以下错误,导致Build失败。
[INFO] Compiling 5 source files to C:\workspace\tes\target\test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[17,39] package com.relevantcodes.extentreports does not exist
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[18,39] package com.relevantcodes.extentreports does not exist
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[19,39] package com.relevantcodes.extentreports does not exist
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[31,9] cannot find symbol
symbol: class ExtentReports
location: class Test.tes.MyHomepageTestCases.HomeTestCases
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[32,9] cannot find symbol
symbol: class ExtentTest
location: class Test.tes.MyHomepageTestCases.HomeTestCases
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[45,28] cannot find symbol
symbol: class ExtentReports
location: class Test.tes.MyHomepageTestCases.HomeTestCases
[ERROR] /C:/workspace/tes/src/test/java/Test/tes/MyHomepageTestCases/HomeTestCases.java:[47,26] cannot find symbol
symbol: variable LogStatus
location: class Test.tes.MyHomepageTestCases.HomeTestCases
[INFO] 7 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
下面是我在eclipse中的代码,我已经导入了extentreport:
import com.relevantcodes.extentreports.ExtentReports;
import com.relevantcodes.extentreports.ExtentTest;
import com.relevantcodes.extentreports.LogStatus;
import Test.tes.Login.LoginPage;
import Test.tes.MyHomepage.Home;
import Test.tes.Utils.AppUtils;
import Test.tes.Utils.BaseTestSetup;
public class HomeTestCases extends BaseTestSetup { //use of inheritance
private static Logger log=Logger.getLogger(HomeTestCases.class);
private LoginPage lpobj = null;
private Home homeObj = null;
ExtentReports extent;
ExtentTest test;