maven-compiler-plugin检查不通过

mvn package -DskipTests 报错:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.311 s
[INFO] Finished at: 2023-02-17T11:00:47+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project batfish: Compilation failure
[ERROR] error: warnings found and -Werror specified
[ERROR]
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :batfish

错误:

查了两个小时,竟然是.....

Set set = new HashSet<Integer>();
【调用Set接口时竟然没有指定类型....哭死,IDE是不会提示这个错的】
 
补充:
可能像一些final 关键字的继承,或者private方法的重写等都会导致编译不通过
参考链接:https://www.cnblogs.com/ityc/p/15916947.html
posted @   机智蛋  阅读(47)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
点击右上角即可分享
微信分享提示