Maven编译过程中下载失败报错PKIX:unable to find valid certification path to requested target

在编译Flink源码时报如下错误,通过错误结合网上一些解决方法看得出来是因为访问网站需要证书验证,因此解决方法就是在网站上下载下来证书,再安装到jdk的jre/lib/security中。

Downloading: https://repo.hortonworks.com/content/repositories/jetty-hadoop/com/microsoft/azure/azure-mgmt-trafficmanager/1.16.0/azure-mgmt-trafficmanager-1.16.0.pom
[ERROR] Failed to execute goal on project flink-swift-fs-hadoop: Could not resolve dependencies for project org.apache.flink:flink-swift-fs-hadoop:jar:1.9.1: The following artifacts could not be resolved: org.apache.hadoop:hadoop-client:jar:2.8.1, org.apache.hadoop:hadoop-common:jar:2.8.1, org.mortbay.jetty:jetty-sslengine:jar:6.1.26, commons-beanutils:commons-beanutils:jar:1.8.3, com.google.code.gson:gson:jar:2.2.4, org.apache.hadoop:hadoop-auth:jar:2.8.1, com.nimbusds:nimbus-jose-jwt:jar:3.9, net.jcip:jcip-annotations:jar:1.0, net.minidev:json-smart:jar:1.1.1, org.apache.htrace:htrace-core4:jar:4.0.1-incubating, org.apache.hadoop:hadoop-hdfs:jar:2.8.1, org.apache.hadoop:hadoop-hdfs-client:jar:2.8.1, com.squareup.okhttp:okhttp:jar:2.4.0, com.squareup.okio:okio:jar:1.4.0, org.apache.hadoop:hadoop-annotations:jar:2.8.1, org.apache.hadoop:hadoop-openstack:jar:2.8.1: Could not transfer artifact org.apache.hadoop:hadoop-client:jar:2.8.1 from/to mapr-releases (https://repository.mapr.com/maven/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [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/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :flink-swift-fs-hadoop

1. Windows参考:
https://blog.csdn.net/gabriel576282253/article/details/81531746

2. CentOS 7:

  • 下载证书:
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

  • 将下载的证书上传到CentOS:

sftp> cd /opt/software/
sftp> put -r "C:\Users\Administrator\Doc
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值