Maven 构建失败--was cached in the local repository, resolution will not be reattempted until the update
问题来源使用Maven构建项目时, 执行编译或者打包,报错误was cached in the local repository, resolution will not be reattempted until the update interval of发现是无法下载对应的依赖包。解决方案1, 到自己的.m2 文件夹或者执行的maven路径下把 xxx.lastUpdated文件全部...
·
问题来源
使用Maven构建项目时, 执行编译或者打包,报错误
was cached in the local repository, resolution will not be reattempted until the update interval of
发现是无法下载对应的依赖包。
解决方案
1, 到自己的.m2 文件夹或者指定的maven路径下(例如我修改了自己maven的setting.xml文件D:\Users\maven_repo)把 xxx.lastUpdated文件全部删掉,重新运行maven,ok!
2, 或者在用maven时加 -U参数,就可以忽略xxx.lastUpdated…
3,在pom文件中repository部分加入 truealways
<repository>
<id>maven-nexus-public</id>
<name>Team Nexus Repository</name>
<url>http://a.b.c.d:8081/nexus/content/groups/public</url>
<releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
</repository>
更多推荐

所有评论(0)