今天使用命令mvn compile编译maven项目时提示错误信息,错误信息如下:

[ERROR] Failed to execute goal on project <project_name>: Could not resolve dependencies
for project com.xxx.xxx:<project_name>:jar:1.0.7: Failure to find com.xxx.xxx:obj-test-client:jar:1.1.1
in http://maven-nexus.xxx.com/repository/maven-public/ was cached in the local repository, resolution
will not be reattempted until the update interval of fintech has elapsed or updates are forced -> [Help 1]

问题原因 :
Maven默认会使用本地缓存的库来编译工程,对于上次下载失败的库,maven会在~/.m2/repository/<group>/<artifact>/<version>/目录下创建xxx.lastUpdated文件,一旦这个文件存在,那么在直到下一次nexus更新之前都不会更新这个依赖库。

解决办法:

删除v~/.m2/repository/<group>/<artifact>/<version>/目录下的*.lastUpdated文件,然后再次运行mvn compile编译工程。

Jenkins构建时报错:

通过jenkins编译时报此错,我的maven安装目录/opt/maven ,解决方法如下:

发现obj-test-client-1.1.1.jar下载到本地时失败,从提示可知是本地仓库的缓存(cached)造成,于是我删除目录/opt/maven/repo/<group>/obj-test-client/1.1.1后Jenkins重新构建(或在项目目录 mvn 重新编译)即可编译成功!

注意你要确定远程仓库中存在此jar(obj-test-client-1.1.1.jar)包

was cached in the local repository, resolution will not be reattempted until the update interval of fintech has elapsed or updates are forced的更多相关文章

  1. Failure to find xxx in xxx was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced @ xxx

    问题: 在linux服务器上使用maven编译war时报错: 16:41:35 [FATAL] Non-resolvable parent POM for ***: Failure to find * ...

  2. Maven-010-maven 编译报错:Failure to ... in ... was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced.

    今晚在编译 maven 项目的时候,命令行报错,出现 Failure to ... in ... 类似错误,详细的错误信息如下所示: [INFO] -------------------------- ...

  3. was cached in the local repository, resolution will not be reattempted until the update interval of localhost-repository has elapsed or updates are forced

    ailed to collect dependencies at com.eshore:common:jar:0.0.1-SNAPSHOT: Failed to read artifact descr ...

  4. Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval o

    pom.xml报错: Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from https://repo.maven.apach ...

  5. resolution will not be reattempted until the update interval of repository-group has elapsed or updates are forced

    Failed to execute goal on project safetan-web: Could not resolve dependencies for project com.safeta ...

  6. maven 下载jar失败: resolution will not be reattempted until the update interval of central has elapsed or updates are forced

    Multiple annotations found at this line: - ArtifactTransferException: Failure to transfer com.faster ...

  7. resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced

    Maven在执行中报错: - Failure to transfer org.slf4j:slf4j-api:jar:1.7.24 from http://localhost:8081/nexus/c ...

  8. 项目更改版本号之后打包失败 resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced

    在修改项目的版本号之后,如pom.xml中<version>1.2.0-SNAPSHOT</version>替换为<version>1.0.0-RELEASE< ...

  9. Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from http://repo.maven.apache.org/ maven2 was cached in the local repository, resolution will not be reattempted until the update interv

    Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from http://repo.maven.apache.org/  mave ...

随机推荐

  1. MySQL 8 新特性之降序索引

    MySQL 8.0终于支持降序索引了.其实,从语法上,MySQL 4就支持了,但正如官方文档所言,"they are parsed but ignored",实际创建的还是升序索引 ...

  2. QM4_Probability

    Basic Concepts Probability concepts Terms Random variable A quantity whose possible values are uncer ...

  3. Selenium 指定浏览器位置

    在脚本开头要指定浏览器位置. public static void main(String[] args) throws InterruptedException, IOException { Sys ...

  4. Java Script中常见操作

    字符串常见操作:obj.length 长度obj.trim() 移除空白obj.trimLeft()obj.trimRight)obj.charAt(n) 返回字符串中的第n个字符obj.concat ...

  5. 在Mybatis-spring上基于注解的数据源实现方案

    一.遇到的痛点 最近在学习Spring-boot过程中,涉及到操作数据库.按照DOC引入mybatis-spring-boot-starter,然后按照套路配置application.properti ...

  6. LCA 各种神奇的LCA优化方法

    LCA(Least Common Ancestors) 树上问题的一种. 朴素lca很简单啦,我就不多说了,时间复杂度n^2 1.倍增LCA 时间复杂度 nlongn+klogn 其实是一种基于朴素l ...

  7. webpack下css/js/html引用图片的正确方式

    在webpack的处理下,为了使引用的图片被打包编译(以把src的图片文件编译到dist中或者对src的文件进行base64编码),应使用如下引用方式: 1. 在html/ejs等中引用图片: 借助r ...

  8. XSS攻击(出现的原因、预防措施......)

    验证XSS攻击重点不是去查找可输入哪些内容会出现什么样的bug就是测试XSS攻击,重点是了解它出现的原理,为什么会出现XSS攻击,导致一些问题出现?如何防御与解决XSS攻击?以下我将简单介绍以上提出的 ...

  9. Netty自定义协议解析原理与应用

    目前,大家都选择Netty做为游戏服务器框架网络通信的框架,而且目前也有很多优秀的产品是基于Netty开发的.它的稳定性,易用性和高效率性已得到广泛的认同.在游戏服务器开发中,选择netty一般就意味 ...

  10. FontAwesome 图标字体库的使用

    在前端开发中,许多新手常会遇见一个问题,参考的网页上有类似下图的图标,但在资源里却找不到对应的文件,这是因为这些网页使用了图标库.这里介绍一种常见的图标库——FontAwesome的使用. 1.登录F ...