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

来源:互联网 发布:怎样申请新的淘宝账号 编辑:程序博客网 时间:2024/05/16 06:46

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project first: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

stackoverflow
不是很理解,问题出现在JRE设置上面,就是在windows -> Preferences -> Java -> Installed JREs上面你必须选择哪个指向JDK的虚拟机,所以需要增加一个执行JDK的VM。
你的原来可能是这样的:

添加后呢是这样的,并且选中新的哪个JDK;同时你新的JRE时候 注意把这个VM 参数也配上。
-Dmaven.multiModuleProjectDirectory=$M2_HOME

然后就配置好了maven

0 0
原创粉丝点击