今天使用命令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. bash: jar: 未找到命令..(command not found)

    /bin/bash: jar: command not found 解决办法: cd /usr/bin 必须先进入/usr/bin,下同 sudo ln -s -f /usr/lib/jvm/jdk1 ...

  2. 运用BT在centos下搭建一个博客论坛

    在日常的工作和学习中,我们都很希望有自己的工作站,就是自己的服务器,自己给自己搭建一个博客或者是论坛,用于自己来写博客和搭建网站论坛.现在我们就用一个简单的方法来教大家如何30分钟内部署一个博客网站. ...

  3. 模板——无旋Treap

    #include "bits/stdc++.h" using namespace std; inline int read(){ ,k=;char ch=getchar(); :, ...

  4. bzoj 1592 dp

    就是dp啊 f[i][j]表示到第i位,最后一位高度是j的最小花费 转移::f[i][j]=minn(f[i-1][k])+abs(a[i]-num[j]);(k<=j) #include< ...

  5. BZOJ_1085_[SCOI2005]骑士精神_IDDFS

    BZOJ_1085_[SCOI2005]骑士精神_DFS Description 在一个5×5的棋盘上有12个白色的骑士和12个黑色的骑士, 且有一个空位.在任何时候一个骑士都能按照骑 士的走法(它可 ...

  6. laravel 中路由的快速设置(只需一个控制器名就ok) 不用具体到方法

    routes/web.php 设置路由 Route::group(['middleware' => ['\iqiyi\Http\Middleware\VerifyCsrfToken::class ...

  7. 读取txt内文件内容

    命令如下: f = open("c:\\1.txt","r")  lines = f.readlines()#读取全部内容  for line in lines ...

  8. .NET Core 迁移躺坑记续集--Win下莫名其妙的超时

    继上一集里说到遇到的各种问题并且弄了n个解决方案之后,特别是对于问题4的解决方案对于切换了HttpClientFactory 我用了你家netcore 2.1下专门解决之前HttpClient口病已久 ...

  9. 我是庖丁,<肢解IOT平台>之物模型

    前言 物模型是对设备在云端的功能描述,包括设备的属性,数据,服务和事件. 物联网平台通过定义一种物的描述语言来描述物模型,称之为 TSL(即 Thing Specification Language) ...

  10. Layer 使用

    官网文档 http://layer.layui.com/mobile/api.html 1.需要添加jquery的引用然后是 loadExtentFile("css", " ...