maven编译的时候遇到的奇葩问题,  非常奇葩, 所有其他同事都没有遇到 , 仅仅是我遇到了

不清楚是因为用了最新的JDK的缘故(1.8 update91)还是其他什么原因. 总之是证书的问题.

当时的情况是maven去公司的nexus中心下文件 , nexus是以https开头的地址.下载的时候就出现了上面的问题.

解决办法如下 :

1.下载证书

  1.1在web浏览器上(这里我用的是chrome)打开https的链接,然后点击https前面的小锁头,然后点详细信息.就可以看到右侧有一些信息.然后点击view certificate.直接拖拽证书的图标到一个路径,就保存下来了.这里我的文件叫nexus.rc.dataengine.com.cer

2.进入JDK的security路径

  cd $JAVA_HOME/jre/lib/securiy

3.执行命令导入证书

  sudo keytool -keystore cacerts -importcert -alias nexussecureca -file /Users/kane/nexus.rc.dataengine.com.cer

遇到输入口令的情况 , java的默认口令是changeit

maven PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path的更多相关文章

  1. Maven:sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    还是记录使用 maven 时遇到的问题. 一.maven报错 maven package 进行打包时出现了以下报错: Non-resolvable parent POM for com.wpbxin: ...

  2. mvn 编译报错mavn sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targ

    mavn 编译报错: mavn sun.security.validator.ValidatorException: PKIX path building failed: sun.security.p ...

  3. 解决 java 使用ssl过程中出现"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

    今天,封装HttpClient使用ssl时报一下错误: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorExc ...

  4. java程序中访问https时,报 PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    在java中使用https访问数据时报异常: Caused by: sun.security.validator.ValidatorException: PKIX path building fail ...

  5. Flutter配置环境报错“PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”

    背景:最近看了很多Flutter漂亮的项目,想要尝试一下.所有环境都搭建好之后,按照文档一步一步配置(抄袭),但始终报如下图错误. PKIX path building failed: sun.sec ...

  6. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    注:网上搜来的快照,暂未验证 在java代码中请求https链接的时候,可能会报下面这个错误javax.net.ssl.SSLHandshakeException: sun.security.vali ...

  7. 报错PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

    今天在调用第三方HTTPS接口的时候,一直显示这个报错,然后百度很久,有2种解决方法,一个是说自己手动去导入,第二种用代码忽略证书验证.我用二种方式, 复制即用, public void test2( ...

  8. ES访问遇到sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    cmd命令cd到jre/bin目录下 输入命令keytool -import -alias 别名 -keystore cacerts -file ‪C://certs//elasticsearch// ...

  9. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    httpclient-4.5.jar 定时发送http包,忽然有一天报错,http证书变更引起的. 之前的代码 try { CloseableHttpClient httpClient = build ...

随机推荐

  1. java基础之:匿名内部类

    在java提高篇-----详解内部类中对匿名内部类做了一个简单的介绍,但是内部类还存在很多其他细节问题,所以就衍生出这篇博客.在这篇博客中你可以 了解到匿名内部类的使用.匿名内部类要注意的事项.如何初 ...

  2. mysql启动与关闭(手动与自动)

    手动管理mysql的启动与关闭 [root@mysql ~]# service mysql start --手动启动mysqlStarting MySQL. SUCCESS![root@mysql ~ ...

  3. 制作和unity调用动态链接库dll文件

    首先用vc建立一个dll工程 然后在里面建立一个testunity.h文件.内容如下 1 extern "C" int _declspec(dllexport)testunity( ...

  4. python中文输出和写入文本

    中文输出 #-*-coding:utf8-*- import requests import re timeout = 8 headers = {'User-Agent':'Mozilla/5.0 ( ...

  5. charles proxy

    charles proxy  一个比较好用的代理工具,可以进行数据的移动,以及pc 数据的抓包.

  6. js 动态 activex 组件

    function writeObject(){ var obj = document.getElementById("mydelphi"); if(!obj){ var divob ...

  7. OSPF(Open Shortest Path First开放式最短路径优先 -链路状态路由协议

    OSPF分为OSPFv2和OSPFv3两个版本,其中OSPFv2用在IPv4网络,OSPFv3用在IPv6网络 思科OSPF的协议管理距离(AD)是110,华为OSPF的协议管理距离是10 通告网络接 ...

  8. Python关键字yield的解释(stackoverflow)

    3.1. 提问者的问题 Python关键字yield的作用是什么?用来干什么的? 比如,我正在试图理解下面的代码: def node._get_child_candidates(self, dista ...

  9. JaxWsDynamicClientFactory弃用了,改成org.codehaus.xfire.client;

    搞了好几天jar包冲突,最后修改接口调用方式 java.lang.IllegalStateException: Unable to create JAXBContext for generated p ...

  10. Myeclipse搭建struts2环境

    1.下载Struts2 到Apache Struts2官网下载最新的Struts2  http://struts.apache.org/download.cgi#struts2316-SNAPSHOT ...