Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1

报错原因:编译用的jdk版本不对,检查两个位置

1.pom.xml中编译插件配置

 2.maven安装包config下的setting.xml中的编译版本   

这两个地方的jdk版本需要一致,我这里用的是11,如果你用的是1.8,请把本文所涉及的所有11改为1.8

猜你喜欢

转载自blog.csdn.net/love_yr/article/details/121303870