升级老项目spring boot 和 cloud版本之后 gradle clean 报错:“Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin with id 'org.springframework.boot' not found.”

 

原来的build.gradle 中是这样的:

buildscript {
ext {
springBootVersion = '2.1.6.RELEASE'
}
repositories {
mavenCentral()

mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}

 修改:

去掉 mavenLocal()

这个函数会优先查找本地本地的maven仓库,按照这个顺序查找依赖:USER_HOME/.m2/settings.xml >> M2_HOME/conf/settings.xml >> USER_HOME/.m2/repository

而我本地这个文件夹并没有springboot的最新版本依赖,所以会提示找不到sringboot



相关文章:

  • 2021-09-24
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-03
  • 2021-11-03
  • 2021-04-16
  • 2021-07-22
  • 2021-11-01
相关资源
相似解决方案