解决 Maven was cached in the local repository, resolution will not be reattempted until the update interv

问题原因

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

解决办法:

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

时间: 2024-10-08 09:25:28

解决 Maven 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/ 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/ maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Origi

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.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are fo

MAVEN奇葩问题was cached in the local repository, resolution will not be reattempted until

[ERROR] Non-resolvable import POM: Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:Finchley.M7 in https://maven.aliyun.com/repository/public was cached in the local repository, resolution will not be reattempted until the upda

maven build失败 (Failure to find io.renren:renren-security:pom:3.2.0 in http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository...)

今天mvn clean package一个子工程(renren-admin)时报错: Failed to execute goal on project renren-admin: Could not resolve dependencies for project io.renren:renren-admin:war:3.2.0: Failed to collect dependencies at io.renren:renren-common:jar:3.2.0: Failed to rea

Maven依赖中类似was cached in the local repository样的错误

我们在使用maven编译一个项目时经常会遇到诸如此类的问题. Could not get the value for parameter encoding for plugin execution default-resources Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failure to find org.code

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.fasterxml.jackson.core:jackson-databind:jar:2.9.0.pr3 from http:// repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattem

解决maven执行命令时提示:cached in the local repository

可能原因是maven私服找不到相关jar. 我们可以到http://mvnrepository.com中找到相应的jar,上传到私服即可. 然后到本地仓库中找到相应的文件夹路径,删除相关文件夹后,再执行maven命令.

Failure to find parent:pom:2.2.6 in http://maven.aliyun was cached in the local repository...

报错如下: 原因分析:主要是阿里云的Maven仓库无法更新这个版本的pom依赖: 解决过程:于是直接在pom里面添加阿里云maven,还是报同样的错误:看到网上说删除maven仓库的对应目录或目录下的*.lastUpdated文件,然后再次运行maven命令,然后再打包设置相关的属性,但是又报无权限访问的错误:    后来就想着要不更改pom的版本,将其降低点,即改为2.2.5就好了,如下图所示: <?xml version="1.0" encoding="UTF-8&

将jar文件加到Maven的local repository中

对于Maven项目来说,日常使用的多数第三方java库文件都可以从Maven的Central Repository中自动下载,但是如果我们需要的jar文件不在Central Repository中,那么我们就需要手动将自己下载的jar文件加入到Maven的local reposotory中了,此时我们需要向Maven提供用于识别jar文件(可能多个)的groupId, artifactId和version等信息. 我并不打算讲怎么将一个下载的jar库加入到local repository中,我们