Spring 引导 2.3.3.RELEASE 项目在 gradle 版本 5.6.3 中构建失败,异常"org.gradle.api.plugins.UnknownPluginException"



我的gradle版本是5.6.3.

,而我运行2.3.3的春季启动项目。使用"gradle clean build"发布时,显示如下错误:

* What went wrong:
Plugin [id: 'org.springframework.boot', version: '2.3.3.RELEASE'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.3.3.RELEASE')
Searched in the following repositories:
Gradle Central Plugin Repository

更新我的问题:

我的构建。gradle:

plugins {
id 'org.springframework.boot' version '2.3.3.RELEASE'
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id 'java'
id 'war'
}
group = 'net.project'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
test {
useJUnitPlatform()
}

和我的设置。Gradle只包含根项目名

Spring boot 2.3.3。正如我在这里看到的,RELEASE肯定存在于gradle中央插件库中。您很可能是在公司防火墙后面构建的,并且禁用了外发URL。之前遇到过同样的问题,我通过要求it运营团队(很好地)允许https://plugins.gradle.org/请求通过来解决这个问题。出于安全考虑,如果他们不允许这样做,那么你可以要求他们按照下面的指示创建一个本地镜像服务器

相关内容

最新更新