maven的_remote.repositories
1.情况描述
这个包在镜像服务器没有了,已经过时。
本地仓库有这个jar包
2.报错
[ERROR] Failed to execute goal on project easylife-cms: Could not resolve dependencies for project xxx: Failed to collect dependencies at com.json:json:jar:1.0: Failed to read artifact descriptor for com.json:json:jar:1.0: Could not transfer artifact com.json:json:pom:1.0 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): 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:
3.排查
删除本地仓库中的jar
使用mvn命令安装json.jar
这时就可以用了。
观察原先的_remote.repositories与现在的_remote.repositories发现不同,我把maven的setting中的本地仓库、私服仓库、中心仓库的名称改了一下。
_remote.repositories中:
xx文件>私服ID名称
如果修改私服ID名称时,发现没有这个仓库了,会去中心仓库去下载,中心仓库还没有。