设置了maven代理之后,又报错了有木有,确实考验人。
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.10:get (default-cli) on project standalone-pom: Couldn't download artifact: Could not transfer artifact org.cyanogenmod:gello:apk:40 from/to central (https://maven.cyanogenmod.org/artifactory/gello_prebuilds): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[ERROR] org.cyanogenmod:gello:apk:40
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false),
[ERROR] central (https://maven.cyanogenmod.org/artifactory/gello_prebuilds, releases=true, snapshots=true)
[ERROR] -> [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/MojoExecutionException
unable to find valid certification path to requested target
上面这句是关键,无法找到有效的证书请求的目标路径,google吧,没别的办法,于是我又很巧的找到了一个前辈,地址
我通过一下几步完成了SSL证书导入
首先通过火狐浏览器(最好是)访问这个地址,https://maven.cyanogenmod.org/artifactory/gello_prebuilds/ 如果访问过程询问是否要添加证书,一定选择添加或者信任。
###1.1在地址栏旁边的小锁头点一下
###1.2再点击大于号(>),再点击更多信息,然后再查看证书,最后保存证书,我保存到了~/apps/目录下,如下图:
###1.3证书保存之后,执行下面命令
leon@leon-ubuntu:~/apps/MySSL$ sudo cp ./\*.cyanogenmod.org.crt /usr/local/share/ca-certificates/\*.cyanogenmod.org.crt
leon@leon-ubuntu:~/apps/MySSL$ sudo update-ca-certificates
Updating certificates in /etc/ssl/certs...
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
Adding debian:*.cyanogenmod.org.pem
done.
done.
###1.4显示添加成功,下载SSLPoke验证一下
SSLPoke 下载 密码: v88n
$ java SSLPoke maven.cyanogenmod.org 443
Successfully connected
显示Successfully connected则连接成功!
最后抓紧make一下
make clean
make -j8