Maven打包报MojoFailureException的错误
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project eureka: Compilation failure[ERROR] No compiler is provided in this environment. Perhaps..
·
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project eureka: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
分析:[错误]在此环境中不提供编译器。也许你是在JRE上运行,而不是JDK?
解决方案一:
1、 在eclipse中,选择window→preference→java→Installed JREs 点add添加你的jdk路径,选jdk而不是jre,之前的报错原因就出在这里。
2、右键你的maven工程,在maven中点击update project,然后maven clean
解决方案二:
1、右键选中项目, 点击Build Path --> Configure Build Path
2、选中Libraries -->JRE-->Edit
3、选中Alternate JRE
更多推荐
已为社区贡献4条内容
所有评论(0)