maven项目进行debug as->maven test构建时报error:running on a JRE rather than a JDK? _02

来源:互联网 发布:距离感应软件 编辑:程序博客网 时间:2024/05/07 00:59

maven项目进行debug as->maven test构建时报error:running on a JRE rather than a JDK? _02

问题描述:

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


解决办法:

1.选中maven项目右键->properties->Java Build Path->Libraries子窗口选中复选框“JRE System Library[jdk1.8.0_60]”进行打钩

->点击"Apply","Ok"按钮

2.选中maven项目右键->Maven->Update Project

3.选中maven项目右键->Debug As->Maven Test

如果看到Build Success说明构建成功

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

0 0
原创粉丝点击