启动应用程序时,将引发解决问题。
Cannot resolve org.springframework.boot:spring-boot-devtools:pom:2.6.5 failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt.
This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer artifact org.springframework.boot:spring-boot-devtools:pom:2.6.5 from/to central (https://repo.maven.apache.org/maven2):
transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-devtools/2.6.5/spring-boot-devtools-2.6.5.pom该URL是可访问的。
发布于 2022-03-30 09:55:19
该依赖项的本地版本(在~/.m2/repository中)似乎已损坏。尝试在那里删除它,然后再次从maven central重新启动下载过程。
发布于 2022-03-30 10:07:19
当您在添加依赖项之后构建应用程序时,当maven试图下载工件及其依赖项时,下载可能会因为某种原因(可能是网络问题)而失败,然后maven会放置一个带有第一次尝试时间戳的文件。如果在第一次尝试maven构建之后,尝试maven重新组织第一次尝试失败,并检查时间戳以检查是否已经过了足够的时间,如果没有,它将引发This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced。
如果要强制maven更新更新间隔之前失败的依赖项,则可以使用-U开关。
因此,使用-U开关(如mvn <goal> -U )运行maven目标
https://stackoverflow.com/questions/71674854
复制相似问题