编译成功,但是mvn test时报错符号找不到

您所在的位置:网站首页 maven打包报错找不到符号 编译成功,但是mvn test时报错符号找不到

编译成功,但是mvn test时报错符号找不到

#编译成功,但是mvn test时报错符号找不到| 来源: 网络整理| 查看: 265

D:\Maven\code\maven01>mvn testPicked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8[INFO] Scanning for projects...[INFO][INFO] ------------------< com.imooc.maven01:maven01-model >-------------------[INFO] Building maven01-model 0.0.1-SNAPSHOT[INFO] --------------------------------[ jar ]---------------------------------[INFO][INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ maven01-model ---[INFO] Using 'UTF-8' encoding to copy filtered resources.[INFO] skip non existing resourceDirectory D:\Maven\code\maven01\src\main\resources[INFO][INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ maven01-model ---[INFO] Changes detected - recompiling the module![INFO] Compiling 1 source file to D:\Maven\code\maven01\target\classes[INFO][INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ maven01-model ---[INFO] Using 'UTF-8' encoding to copy filtered resources.[INFO] skip non existing resourceDirectory D:\Maven\code\maven01\src\test\resources[INFO][INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ maven01-model ---[INFO] Changes detected - recompiling the module![INFO] Compiling 1 source file to D:\Maven\code\maven01\target\test-classes[INFO] -------------------------------------------------------------[ERROR] COMPILATION ERROR :[INFO] -------------------------------------------------------------[ERROR] /D:/Maven/code/maven01/src/test/java/com/imooc/maven01/model/HelloWorldTest.java:[9,55] 找不到符号  符号:   类 HelloWorld  位置: 类 com.imooc.maven01.model.HelloWorldTest[INFO] 1 error[INFO] -------------------------------------------------------------[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 1.789 s[INFO] Finished at: 2018-07-20T16:34:48+08:00[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project maven01-model: Compilation failure[ERROR] /D:/Maven/code/maven01/src/test/java/com/imooc/maven01/model/HelloWorldTest.java:[9,55] 找不到符号[ERROR]   符号:   类 HelloWorld[ERROR]   位置: 类 com.imooc.maven01.model.HelloWorldTest[ERROR][ERROR] -> [Help 1]

报错说这有错找不到符号

https://img2.sycdn.imooc.com/5b519f340001ca9409150273.jpg

可是照着打没错的呀

https://img1.sycdn.imooc.com/5b519f5000016c4605550163.jpg

我是真的没辙了,求大佬解答下万分感谢



【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3