Abel
Abel

Reputation: 91

could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.6.RELEASE'

Gradle command throwing below Exception:

FAILURE: Build failed with an exception.

BUILD FAILED in 5s

Configuration:

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'
}

Upvotes: 9

Views: 17468

Answers (3)

Prashant Shubham
Prashant Shubham

Reputation: 516

For me the JDK installed was compliled and hosted via company, hence even after following above options like disabling VPN, was not working. Used sdkman to install a open source JDK version and defaulted JAVA_HOME to newly installed java version, it started working. This might be an edge case but might help folks.

Upvotes: 0

Vittal Manikonda
Vittal Manikonda

Reputation: 46

It is because of network problem, when I change the vpn , it started working

Upvotes: 1

取一个好的名字
取一个好的名字

Reputation: 1823

You should upgrade the gradle version and currently upgrade to Gradle 5.5.1 is ok, and you need to set your idea to the current update gradle version

enter image description here https://plugins.gradle.org/plugin/org.springframework.boot

Upvotes: 1

Related Questions