http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

来源:互联网 发布:淘客qq群发软件 编辑:程序博客网 时间:2024/06/05 06:22

从第一天接触maven至今,这个问题总像个苍蝇一样甩不掉,在用run命令启动项目的时候,时不时会报这个错:

 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project fsly_service: Compilation failure

 http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

全文如下:

D:\maven\fsly_service>mvn tomcat7:run

[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building fsly_service 2.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.1:run (default-cli) @ fsly_service >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ fsly_service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 15 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ fsly_service ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 159 source files to D:\maven\fsly_service\target\classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] /D:/maven/fsly_service/src/main/java/com/hk/foodsafety/service/demo/business/impl/ContactBusinessServiceImpl.java: D:\maven\fsly_service\src
\main\java\com\hk\foodsafety\service\demo\business\impl\ContactBusinessServiceImpl.java使用了未经检查或不安全的操作。
[WARNING] /D:/maven/fsly_service/src/main/java/com/hk/foodsafety/service/demo/business/impl/ContactBusinessServiceImpl.java: 有关详细信息, 请使用 -Xli
nt:unchecked 重新编译。
[INFO] 2 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/maven/fsly_service/src/main/java/com/hk/foodsafety/service/security/SecurityFilter.java:[138,37] 找不到符号
  符号:   方法 getStatus()
  位置: 类型为javax.servlet.http.HttpServletResponse的变量 response
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 57.118 s
[INFO] Finished at: 2014-11-05T16:13:22+08:00
[INFO] Final Memory: 16M/68M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project fsly_service: Compilation failu
re
[ERROR] /D:/maven/fsly_service/src/main/java/com/hk/foodsafety/service/security/SecurityFilter.java:[138,37] 找不到符号
[ERROR] 符号:   方法 getStatus()
[ERROR] 位置: 类型为javax.servlet.http.HttpServletResponse的变量 response
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:

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


这个问题有时有,有时没有,今天在一个外国网站上看到这个Exception的介绍:

https://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException



从以上介绍看,好像是某个插件导致的问题。

下面的评论中有一条:



说的是内存不足会导致这个问题,这时,看看自己的电脑,开了好多程序,卡爆了。。。

于是关掉了一些,然后重新用  run 命令启动项目,OK,问题解决。。。



0 0