构建环境: idea 2020 ,gradle 6.6 ,jdk 11 问题: unable to find valid certification path to requested target 过程: 试过很多种方法,问题一直没有解决(jdk从8升级到11,gradle从5.6.4升级到6.6,也向jdk中导入过ssl证书,一直无法解决) idea构建异常信息: Could not resolve me.champeau.gradle:japicmp-gradle-plugin:0.2.8. Required by: project :buildSrc > Could not resolve me.champeau.gradle:japicmp-gradle-plugin:0.2.8. > Could not get resource 'https://plugins.gradle.org/m2/me/champeau/gradle/japicmp-gradle-plugin/0.2.8/japicmp-gradle-plugin-0.2.8.pom'. > Could not GET 'https://plugins.gradle.org/m2/me/champeau/gradle/japicmp-gradle-plugin/0.2.8/japicmp-gradle-plugin-0.2.8.pom'. > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target > Could not resolve me.champeau.gradle:japicmp-gradle-plugin:0.2.8. > Could not get resource 'https://repo.maven.apache.org/maven2/me/champeau/gradle/japicmp-gradle-plugin/0.2.8/japicmp-gradle-plugin-0.2.8.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/me/champeau/gradle/japicmp-gradle-plugin/0.2.8/japicmp-gradle-plugin-0.2.8.pom'. > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
cmd构建异常信息: Downloading https://services.gradle.org/distributions/gradle-5.6.4-bin.zip
Exception in thread "main" javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Comment From: bclozel
Can you access this URL with curl on your computer? https://plugins.gradle.org/m2/me/champeau/gradle/japicmp-gradle-plugin/0.2.8/japicmp-gradle-plugin-0.2.8.pom
I can download this resource without any issue from where I am - I don't see any ongoing problem on https://status.gradle.com/ - so this might be a certificate or proxy issue on your side?
Comment From: wangke6194
I build spring in windows ,and i can download this file too. i am already put the website certificate to jdk and it doesn't work,now i don't know how to resolve it
Comment From: bclozel
At this point the problem is probably not in the Spring Framework build.
There might be a problem with your JDK or a specific proxy configuration.
Do you have a Gradle/JVM HTTP proxy configured? Check c:\Users\your_username\.gradle\gradle.properties
.
Maybe a transparent proxy is applied to your connection? You could checking the certificate chain for this domain.
openssl s_client -connect plugins.gradle.org:443
The most likely problem is probably a faulty JDK install with missing CA certificates. See this StackOverflow question.
Comment From: bclozel
I'm closing this issue for now as it seems that it's not related to the Spring Framework build but some TLS issue on the developer workstation. Feel free to comment with your findings!
Comment From: kebukeYi
同样问题
Comment From: snicoll
@kebukeYi posting "same problem" isn't very helpful. Please review the history of the issue as Brian was asking a question and provided useful references.