我為此嘗試了不同的解決方案,但對我不起作用,請查看錯誤日志和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 時出現(xiàn)上述錯誤
1 回答

有只小跳蛙
TA貢獻1824條經(jīng)驗 獲得超8個贊
將 pom 中的版本改為 1.8 而不是 jdk1.8.0_172
<configuration>
<toolchains>
<jdk>
<version>1.8</version>
<vendor>sun</vendor>
</jdk>
</toolchains>
</configuration>
添加回答
舉報
0/150
提交
取消