我正在使用gradle构建我的项目,并尝试使用springboot插件
plugins {
id 'java-library'
id 'org.springframework.boot' version '2.4.3'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
}
但是得到这个错误:
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.4.3.
Required by:
project :atf-data-mapper > org.springframework.boot:org.springframework.boot.gradle.plugin:2.4.3
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.4.3.
> Could not get resource 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-gradle-plugin/2.4.3/spring-boot-gradle-plugin-2.4.
3.module'.
> Could not HEAD 'https://jcenter.bintray.com/org/springframework/boot/spring-boot-gradle-plugin/2.4.3/spring-boot-gradle-plugin-2.4.3.modul
e'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to reque
sted target
我补充道”https://plugins.gradle.org“证书的cacerts和检查,在想法我使用正确的sdk和gradle,但仍然得到这个错误。
我使用的命令:
keytool -import -trustcacerts -keystore "C:\Program Files\Java\jdk-14.0.2\lib\security\cacerts" -storepass changeit -alias CERTIFICATE -file "D:\certificates\repo.cer"
如果有任何帮助,我将不胜感激
暂无答案!
目前还没有任何答案,快来回答吧!