[WARNING] Could not transfer metadata org.apache.commons:commons-imaging:1.0-SNAPSHOT

1、描述

最近从Github上下载原先升级为Maven的项目,结果控制台一直报错,clean和update也没有解决。经过分析异常信息,最终原因是maven-metadata.xml没有正常下载。其中根本原因是异常中的https://repository.apache.org/content/repositories/snapshots/不能下载commons-imaging。
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException 这是缺少安全证书时出现的异常,解决方案就是将你要访问的webservice的安全认证证书导入到客户端即可。试过安装证书,但在虚拟机里不能操作,没有权限。

[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------------< com.hgc:fas2 >----------------------------
[INFO] Building fas2 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] Downloading from : https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.commons:commons-imaging:1.0-SNAPSHOT/maven-metadata.xml from/to apache.snapshots (https://repository.apache.org/content/repositories/snapshots/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[WARNING] Failure to transfer org.apache.commons:commons-imaging:1.0-SNAPSHOT/maven-metadata.xml from https://repository.apache.org/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.commons:commons-imaging:1.0-SNAPSHOT/maven-metadata.xml from/to apache.snapshots (https://repository.apache.org/content/repositories/snapshots/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[INFO] Downloading from : https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.855 s
[INFO] Finished at: 2019-08-23T15:43:30+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project fas2: Could not resolve dependencies for project com.hgc:fas2:war:0.0.1-SNAPSHOT: Failed to collect dependencies at com.itextpdf:itext-xtra:jar:5.5.10 -> org.apache.commons:commons-imaging:jar:1.0-SNAPSHOT: Failed to read artifact descriptor for org.apache.commons:commons-imaging:jar:1.0-SNAPSHOT: Could not transfer artifact org.apache.commons:commons-imaging:pom:1.0-SNAPSHOT from/to apache.snapshots (https://repository.apache.org/content/repositories/snapshots/): 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

2、解决

在settings.xml中添加repositories,http://jump-pilot.sourceforge.net/repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/ 可以直接访问链接。如果出现解析不了的情况,大部分是下载链接不对。

<repositories>
	<repository>
		<id>jump-pilot</id>
		<name>central</name>
		<url>http://jump-pilot.sourceforge.net/repository</url>
	</repository>	
</repositories>
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值