报错:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile

在eclispe上运行mvn命令报错:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project VSS: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

解决方式:Eclipse点击Windows>prefernces>java>installed JREs   这里要选择自己jdk所在路径,我原来选择的是一个默认的路径不正确,更改后,报错解决;

猜你喜欢

转载自blog.csdn.net/qq_33719152/article/details/86071359