Failure to find ... was cached in the local repository, resolution will not be reattempted until the update interval of public has elapsed or updates are forced 问题解决
当我对项目进行打包时,报了以下错误:
Failure to find com.st:oscarJDBC16:pom:1.0.0 in http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of public has elapsed or updates are forced
简单直译:无法在http://maven.aliyun.com/nexus/content/groups/public/中找到com.st:oscarJDBC16:pom:1.0.0被缓存在本地存储库中,在public的更新间隔过去或强制更新之前,不会重新尝试解析
为解决这个问题,查阅了比较多的信息如下:
1,
去自己的.m2 文件夹下把 xxx.lastUpdated文件全部删掉,重新运行maven,ok!
或者在用maven时加 -U参数,就可以忽略xxx.lastUpdated..
这里,简单排查,并不是这个原因导致的
2,
换下版本,或者换源试
换了多次,依旧报错
3,
在repository的release或者snapshots版本中新增updatePolicy属性,其中updatePolicy可以设置为”always”、”daily” (默认)、”interval:XXX” (分钟)或”never”
<repositories> <repository> <id>io.spring.repo.maven.release</id> <url>http://repo.spring.io/release/</url> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </releases> <snapshots><enabled>false</enabled></snapshots> </repository> </repositories>
依旧报错
最终解决方案
之前的pom配置
修改为直读jar包
问题解决!!!
如果有什么更好的方法或者建议,欢迎留言讨论~~