解决:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile

构建maven项目,使用tomcat插件启动项目时:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project taotao-manager-pojo: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
这里写图片描述

  1. 检查了一下Installed JREs的设置,使用的环境变量为jre
    这里写图片描述

  2. 解决方法:

将Installed JREs的设置修改为jdk即可.这里选择的其实是JAVA_HOME路径,jdk中包含jre
这里写图片描述

  1. 点击finish –》ok,重新启动程序就行了

    ps:小白,望大佬指点

猜你喜欢

转载自blog.csdn.net/tyt_xiaotao/article/details/80659611