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

maven test报错

J:\code\maven01>mvn test

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building maven01-model 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ maven01-mo

del ---

[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e

. build is platform dependent!

[INFO] skip non existing resourceDirectory J:\code\maven01\src\main\resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ maven01-model -

--

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding GBK, i.e. buil

d is platform dependent!

[INFO] Compiling 1 source file to J:\code\maven01\target\classes

[INFO]

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ ma

ven01-model ---

[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e

. build is platform dependent!

[INFO] skip non existing resourceDirectory J:\code\maven01\src\test\resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ maven01

-model ---

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding GBK, i.e. buil

d is platform dependent!

[INFO] Compiling 1 source file to J:\code\maven01\target\test-classes

[INFO] -------------------------------------------------------------

[ERROR] COMPILATION ERROR :

[INFO] -------------------------------------------------------------

[ERROR] /J:/code/maven01/src/test/java/com/imooc/maven01/model/HelloWorldTest.ja

va:[11,52] 找不到符号

  符号:   类 HelloWorld

  位置: 类 com.imooc.maven01.model.HelloWorldTest

[INFO] 1 error

[INFO] -------------------------------------------------------------

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 2.180 s

[INFO] Finished at: 2017-03-15T19:34:09+09:00

[INFO] Final Memory: 14M/159M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.

1:testCompile (default-testCompile) on project maven01-model: Compilation failur

e

[ERROR] /J:/code/maven01/src/test/java/com/imooc/maven01/model/HelloWorldTest.ja

va:[11,52] 找不到符号

[ERROR] 符号:   类 HelloWorld

[ERROR] 位置: 类 com.imooc.maven01.model.HelloWorldTest

[ERROR] -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc

eption

找不到符号、应该是找不到如课程中所说的另一个main文件夹中的sayHello方法、求教如何解决、望大神不吝赐教

正在回答

5 回答

怎么回事?


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

这个问题解决了吗?

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

我也是这个问题,求教!

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

我也是这个错误,后来发现是文件夹main的名字写成 mian了 ,还有如果找不到这个类的话,去看下是不是代码细节出错了.你没贴图,我们也看不到啊.

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

mvn -install


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

举报

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

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

进入课程

maven test报错

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