无法解析插件工件 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.6.RELEASE'

Abe*_*bel 5 gradle spring-boot

Gradle 命令抛出以下异常:

FAILURE:构建失败,出现异常。

  • 其中:构建文件“/Users/abel/Desktop/work/gundam/build.gradle”行:2

  • 出了什么问题:插件 [id: 'org.springframework.boot', version: '2.1.6.RELEASE'] 未在以下任何来源中找到:

  • Gradle 核心插件(插件不在“org.gradle”命名空间中)

  • 插件存储库(无法解析插件工件 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.6.RELEASE') 在以下存储库中搜索:Gradle Central Plugin Repository

  • 尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。

  • https://help.gradle.org获取更多帮助

5 秒内构建失败

配置:

plugins {
    id 'org.springframework.boot' version '2.1.6.RELEASE'
    id 'java'
}

apply plugin: 'io.spring.dependency-management'

group = 'com.demo'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    compileOnly 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

Run Code Online (Sandbox Code Playgroud)

取一个*_*的名字 1

您应该升级gradle版本,目前升级到Gradle 5.5.1是可以的\xef\xbc\x8c\n并且您需要将您的想法设置为当前更新gradle版本

\n\n

在此输入图像描述\n https://plugins.gradle.org/plugin/org.springframework.boot

\n