首页 > 其他 > 详细

gradle 编译 azkaban 出错

时间:2020-09-06 14:29:38      阅读:125      评论:0      收藏:0      [点我收藏+]

主要出错信息:

> Could not resolve all artifacts for configuration ‘:classpath‘.
   > Could not resolve com.cinnober.gradle:semver-git:2.2.3.
     Required by:
         project :
      > Could not resolve com.cinnober.gradle:semver-git:2.2.3.
         > Could not get resource ‘https://plugins.gradle.org/m2/com/cinnober/gradle/semver-git/2.2.3/semver-git-2.2.3.pom‘.
            > Could not GET ‘https://plugins.gradle.org/m2/com/cinnober/gradle/semver-git/2.2.3/semver-git-2.2.3.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve com.cinnober.gradle:semver-git:2.2.3.
         > Could not get resource ‘https://repo.maven.apache.org/maven2/com/cinnober/gradle/semver-git/2.2.3/semver-git-2.2.3.pom‘.
            > Could not GET ‘https://repo.maven.apache.org/maven2/com/cinnober/gradle/semver-git/2.2.3/semver-git-2.2.3.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve com.cinnober.gradle:semver-git:2.2.3.
         > Could not get resource ‘https://plugins.gradle.org/m2/com/cinnober/gradle/semver-git/2.2.3/semver-git-2.2.3.pom‘.
            > Could not GET ‘https://plugins.gradle.org/m2/com/cinnober/gradle/semver-git/2.2.3/semver-git-2.2.3.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve org.apache.httpcomponents:httpmime:4.3.
     Required by:
         project : > com.github.kt3k.coveralls:com.github.kt3k.coveralls.gradle.plugin:2.6.3 > org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3
      > Could not resolve org.apache.httpcomponents:httpmime:4.3.
         > Could not get resource ‘https://plugins.gradle.org/m2/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.pom‘.
            > Could not GET ‘https://plugins.gradle.org/m2/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve org.apache.httpcomponents:httpmime:4.3.
         > Could not get resource ‘https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.pom‘.
            > Could not GET ‘https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve org.apache.httpcomponents:httpmime:4.3.
         > Could not get resource ‘https://plugins.gradle.org/m2/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.pom‘.
            > Could not GET ‘https://plugins.gradle.org/m2/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve org.eclipse.jgit:org.eclipse.jgit:3.6.0.201412230720-r.
     Required by:
         project : > com.github.kt3k.coveralls:com.github.kt3k.coveralls.gradle.plugin:2.6.3 > org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3
      > Could not resolve org.eclipse.jgit:org.eclipse.jgit:3.6.0.201412230720-r.
         > Could not get resource ‘https://plugins.gradle.org/m2/org/eclipse/jgit/org.eclipse.jgit/3.6.0.201412230720-r/org.eclipse.jgit-3.6.0.201412230720-r.pom‘.
            > Could not GET ‘https://plugins.gradle.org/m2/org/eclipse/jgit/org.eclipse.jgit/3.6.0.201412230720-r/org.eclipse.jgit-3.6.0.201412230720-r.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve org.eclipse.jgit:org.eclipse.jgit:3.6.0.201412230720-r.
         > Could not get resource ‘https://repo.maven.apache.org/maven2/org/eclipse/jgit/org.eclipse.jgit/3.6.0.201412230720-r/org.eclipse.jgit-3.6.0.201412230720-r.pom‘.
            > Could not GET ‘https://repo.maven.apache.org/maven2/org/eclipse/jgit/org.eclipse.jgit/3.6.0.201412230720-r/org.eclipse.jgit-3.6.0.201412230720-r.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve org.eclipse.jgit:org.eclipse.jgit:3.6.0.201412230720-r.
         > Could not get resource ‘https://plugins.gradle.org/m2/org/eclipse/jgit/org.eclipse.jgit/3.6.0.201412230720-r/org.eclipse.jgit-3.6.0.201412230720-r.pom‘.
            > Could not GET ‘https://plugins.gradle.org/m2/org/eclipse/jgit/org.eclipse.jgit/3.6.0.201412230720-r/org.eclipse.jgit-3.6.0.201412230720-r.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve org.codehaus.groovy.modules.http-builder:http-builder:0.7.1.
     Required by:
         project : > com.github.kt3k.coveralls:com.github.kt3k.coveralls.gradle.plugin:2.6.3 > org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3
      > Could not resolve org.codehaus.groovy.modules.http-builder:http-builder:0.7.1.
         > Could not get resource ‘https://plugins.gradle.org/m2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.pom‘.
            > Could not GET ‘https://plugins.gradle.org/m2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve org.codehaus.groovy.modules.http-builder:http-builder:0.7.1.
         > Could not get resource ‘https://repo.maven.apache.org/maven2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.pom‘.
            > Could not GET ‘https://repo.maven.apache.org/maven2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve org.codehaus.groovy.modules.http-builder:http-builder:0.7.1.
         > Could not get resource ‘https://plugins.gradle.org/m2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.pom‘.
            > Could not GET ‘https://plugins.gradle.org/m2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.pom‘.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 15s

解决方法

尝试了添加网站证书到 JAVA_HOME 依然没用。

修改 gradlew 文件,在

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script

这一行下加一行:

GRADLE_OPTS=-Dgradle.user.home=/mnt/e/temp

即指定 gradle 临时目录,这不是重点,重点是:

把前面出错信息中下载失败的各种资源 (pom文件或jar文件)直接通过浏览器下载到这个指定的临时目录中,然后再执行

./gradlew clean build

如果最终发现还是有几个 jar 包提示下载出错,则在上面设置的临时目录下找到以下路径:caches/modules-2/files-2.1,这里就是下载的 jar 包的临时目录,按照出错的 jar 包路径创建对应的文件夹。如org.eclipse.jgit,具体再参照已经下载成功的一些 jar 包的目录路径(因为各个包生成的目录路径还不一样)。把手动下载的 jar 包放进去(不一定产生作用),再执行 上述的build命令,再去看看,有可能就下载成功了。

也有可能此时目录已经生成,但在最末端的文件夹内只有一个 pom 文件,此时在跟 pom 文件目录同级的目录下创建一个文件夹,名称随便起,然再执行 build 命令

gradle 编译 azkaban 出错

原文:https://www.cnblogs.com/wuzhiblog/p/13620906.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!