eclipse maven 执行install命令报错

说一下问题:项目右键->Run as->Maven install,结果控制台就报这个错误

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project myPro: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre7\..\lib\tools.jar -> [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.

解决办法:

终归原因,是maven需要jdk,而不是jre。具体解决办法看我的这篇文章

https://blog.csdn.net/baofengyu90/article/details/82886394

(在文章的最后面)

你可能感兴趣的:(Maven)