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

从第一天接触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
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小鹰信息技术服务部

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值