Reputation: 91
Gradle command throwing below Exception:
FAILURE: Build failed with an exception.
Where: Build file '/Users/abel/Desktop/work/gundam/build.gradle' line: 2
What went wrong: Plugin [id: 'org.springframework.boot', version: '2.1.6.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.1.6.RELEASE') Searched in the following repositories: Gradle Central Plugin Repository
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
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
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
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
https://plugins.gradle.org/plugin/org.springframework.boot
Upvotes: 1