maven打包报错--- maven-compiler-plugin:3.1:compile (default-compile) @ cardDrawingSR-mall-apiweb --- [IN

这篇博客讲述了在使用Maven构建项目时遇到的编译问题,由于开发者个人电脑上安装了两个不同版本的JDK(1.8和11),导致了编译失败。博主分享了这个问题的出现情况,即Maven在重新编译模块时,由于JDK版本不兼容引发了致命错误。尽管尝试了网上的解决方案,但并未能解决问题。博客最后透露,问题的根源在于公司项目要求使用JDK11,而个人环境中使用的还是JDK1.8。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ xxxxxxxx
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ cardDrawingSR-mall-apiweb —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project cardDrawingSR-mall-apiweb: Fatal error compiling

— maven-compiler-plugin:3.1:compile (default-compile) @ cardDrawingSR-mall-apiweb —
[INFO] Changes detected - recompiling the module!

在这里插入图片描述
如果你电脑装了两个jdk那么我觉得对你很有用

网上找的办法都不能用
在这里插入图片描述
在这里插入图片描述
公司用的jdk11,自己还是1.8所以报错了
害~~~~~~~~~~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值