默认情况下,Gradle的SNAPSHOT镜像会缓存24小时,官方到是提供了解决方法,但是一旦我们引入了SpringBoot的依赖管理插件,也就是:
dependencyManagement {
imports {
mavenBom "xxx:xxx:1.0.0-SNAPSHOT"
}
}
那么官方修改configurations.all的方式便不再有效。
SpringBoot的依赖管理插件提供了解决方案:
dependencyManagement {
resolutionStrategy {
cacheChangingModulesFor 0, 'seconds'
}
}
需要配置在dependencyManagement中。
网友评论