test执行不了
D:\maven\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 D:\maven\code\maven01\src\main\resour
ces
[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 D:\maven\code\maven01\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/maven/code/maven01/src/main/java/com/imooc/maven01/model/HelloWorld.
java:[2,1] 需要class, interface或enum
[ERROR] /D:/maven/code/maven01/src/main/java/com/imooc/maven01/model/HelloWorld.
java:[4,14] 需要';'
[ERROR] /D:/maven/code/maven01/src/main/java/com/imooc/maven01/model/HelloWorld.
java:[4,15] 方法声明无效; 需要返回类型
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.722 s
[INFO] Finished at: 2018-05-26T17:43:24+08:00
[INFO] Final Memory: 9M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
1:compile (default-compile) on project maven01-model: Compilation failure: Compi
lation failure:
[ERROR] /D:/maven/code/maven01/src/main/java/com/imooc/maven01/model/HelloWorld.
java:[2,1] 需要class, interface或enum
[ERROR] /D:/maven/code/maven01/src/main/java/com/imooc/maven01/model/HelloWorld.
java:[4,14] 需要';'
[ERROR] /D:/maven/code/maven01/src/main/java/com/imooc/maven01/model/HelloWorld.
java:[4,15] 方法声明无效; 需要返回类型
[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
代码没有发现问题,和老师 的一样