我为此尝试了不同的解决方案,但对我不起作用,请查看错误日志和toolchain.xml文件。这些是错误日志:[INFO] --- maven-toolchains-plugin:1.1:toolchain (default) @ ad-api ---[INFO] Required toolchain: jdk [ vendor='sun' version='1.8' ][ERROR] No toolchain found for type jdk[ERROR] Cannot find matching toolchain definitions for the following toolchain types:jdk [ vendor='sun' version='1.8' ][INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 0.619 s[INFO] Finished at: 2018-10-05T08:56:24+02:00[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.apache.maven.plugins:maven-toolchains-plugin:1.1:toolchain (default) on project ad-api: Cannot find matching toolchain definitions for the following toolchain types:[ERROR] jdk [ vendor='sun' version='1.8' ][ERROR] Please make sure you define the required toolchains in your ~/.m2/toolchains.xml file.[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当我将版本 1.8 更新到 jdk1.8._172 时出现上述错误
1 回答
有只小跳蛙
TA贡献1824条经验 获得超8个赞
将 pom 中的版本改为 1.8 而不是 jdk1.8.0_172
<configuration>
<toolchains>
<jdk>
<version>1.8</version>
<vendor>sun</vendor>
</jdk>
</toolchains>
</configuration>
添加回答
举报
0/150
提交
取消