首页 > 代码库 > 解决 Maven was cached in the local repository, resolution will not be reattempted until the update interv

解决 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编译工程。

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