• DevOps
  • 怎样清除jenkins中maven下载出错的依赖jar包?

怎样清除jenkins中maven下载出错的jar包?
流水线中使用: sh "mvn clean install -Dmaven.test.skip=true“, 每次都报错误
The following artifacts could not be resolved: org.springframework.cloud:spring-cloud-commons:jar:2.2.6.BUILD-SNAPSHOT, org.springframework.cloud:spring-cloud-context:jar:2.2.6.BUILD-SNAPSHOT, org.springframework.cloud:spring-cloud-starter-netflix-ribbon:jar:2.2.6.BUILD-SNAPSHOT, org.springframework.cloud:spring-cloud-starter-zipkin:jar:2.2.6.BUILD-SNAPSHOT: Could not find artifact org.springframework.cloud:spring-cloud-commons:jar:2.2.6.BUILD-SNAPSHOT

2.2.6.BUILD-SNAPSHOT这个版本不知道怎么出来的,maven仓库中根本不存在这个版本。 本地测试是没有问题的。使用流水线拉取就会出现这个错误,想清一下jenkins中maven的仓库,不知道方向对不对。

    vrchary

    这是依赖包缺失的问题。可以这样调试:

    1,清理本地 .m2 缓存,再试一下,确认依赖能正常下载
    2,修改配置文件中 spring-cloud-commons:jar:2.2.6.BUILD-SNAPSHOT 的版本为其他版本进行调试

      shaowenchen 谢谢,是项目中引用了两个不同版本的spring-boot-starter-parent的问题,现在好了