Failed to execute goal on project xxx-service: Could not resolve dependencies for project xxx: Failed to collect dependencies at com.xxx:jar:1.0.0: Failed to read artifact descriptor for comxxx:jar:2.0.0: Failure to find com.yyy:yyy:pom:2.0.0 in was cached in the local repository, resolution will not be reattempted until the update interval of test-mirrorId has elapsed or updates are forced
这个是项目中出现的一个问题,多组件的项目,统一进行了版本升级,但是都没有进行发布(maven deploy),因此私服上面没有最新的jar包,只要出现有依赖的组件jar包(一般是接口层),就会导致发布失败。
1、查看远程仓库是否有对应的jar包,没有的话在idel在执行deploy
2、如果远程仓库中已经有了,说明可能是本地仓库资源损坏,而jenkins一直调用本地的失败。
打开jenkins的configure,在build中的Goals and options添加-U,使得强制从远端打包放本地,再运行,成功后,再次还原Goals and options,下次就不会有问题了。
一些其他的可以参考:https://stackoverflow.com/questions/4856307/when-maven-says-resolution-will-not-be-reattempted-until-the-update-interval-of