Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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

like image 405
Abel Avatar asked Jun 27 '19 02:06

Abel


People also ask

What is org Springframework boot?

org.springframework.boot » spring-bootApache. Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". It takes an opinionated view of the Spring platform and third-party libraries so you can get started with minimum configuration.

What does gradle bootRun do?

The Spring Boot gradle plugin provides the bootRun task that allows a developer to start the application in a “developer mode” without first building a JAR file and then starting this JAR file. Thus, it's a quick way to test the latest changes you made to the codebase.

What is build gradle in spring boot?

The Spring Boot Gradle Plugin provides Spring Boot support in Gradle. It allows you to package executable jar or war archives, run Spring Boot applications, and use the dependency management provided by spring-boot-dependencies .

What is bootJar in gradle?

bootJar on the other hand is a specific task added by Spring Boot Gradle plugin that, when the java plugin is present, attaches itself to the assemble lifecycle task. The assemble task is automatically configured to depend upon the bootJar task so running assemble (or build ) will also run the bootJar task.


Video Answer


2 Answers

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

like image 150
取一个好的名字 Avatar answered Oct 04 '22 14:10

取一个好的名字


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

like image 20
Vittal Manikonda Avatar answered Oct 04 '22 16:10

Vittal Manikonda