为了账号安全,请及时绑定邮箱和手机立即绑定

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

D:\Maven\code\maven01>mvn test
Picked 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://img1.sycdn.imooc.com//5b519f340001ca9409150273.jpg

可是照着打没错的呀

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

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


正在回答

2 回答

第二张图第一行,额  imooc不是imook

0 回复 有任何疑惑可以回复我~

包名写错了。。。结了

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
项目管理利器——maven
  • 参与学习       173090    人
  • 解答问题       742    个

使用maven来构建和管理Java项目,从环境配置,到maven核心知识

进入课程

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

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信