Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "plugin was not found in any of the following sources"

I created a Spring MVC project ion Intellij IDEA. When I build my project, following message is displayed, how can I resolve it?

Plugin [id: 'org.springframework.boot', version: '2.1.7.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.7.RELEASE')
  Searched in the following repositories:
    Gradle Central Plugin Repository
like image 441
steven nguyen Avatar asked Aug 28 '19 08:08

steven nguyen


People also ask

What is settings gradle file?

The Gradle settings file The settings.gradle file, located in the root project directory, defines project-level repository settings and tells Gradle which modules it should include when building your app. For most projects, the file looks like the following by default: pluginManagement {

What is gradlePluginPortal?

Using gradlePluginPortal() allows you to resolve any plugin in the buildscript { } block that is published to the Plugin Portal or JCenter(or Maven Central) without caring where it was published or defining multiple repositories.

What is Buildscript in build gradle?

The buildscript is for the build.gradle file itself. So, this would contain dependencies for say creating RPMs, Dockerfile , and any other dependencies for running the tasks in all the dependent build.gradle.

What version of gradle do I have?

In Android Studio, go to File > Project Structure. Then select the "project" tab on the left. Your Gradle version will be displayed here.


1 Answers

I saw the problem even on command line and it helped when I added plugin management to the start of setting.gradle file:

pluginManagement {
    repositories {
        maven { url "https://plugins.gradle.org/m2/" }
        gradlePluginPortal()
    }
}
like image 147
Rostislav Matl Avatar answered Sep 30 '22 17:09

Rostislav Matl