Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plugin [id: 'org.springframework.boot', version: '2.2.4.RELEASE'] was not found in any of the following sources:

I have just downloaded the springboot project from http://start.spring.io/. After running it I got this error.

* What went wrong:
Plugin [id: 'org.springframework.boot', version: '2.2.4.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.2.4.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.

Can any one please suggest what is root cause.

like image 609
rohit kesarvani Avatar asked Feb 01 '20 12:02

rohit kesarvani


4 Answers

I could solve it as follows:
In the build.gradle file add the following lines:

Add these lines to build.gradle

Then you must open a command window and enter the folder where you have the project and execute the following order:
gradle build

That's it, with this your error must be solved ... Greetings !!!

like image 108
wn32v1.0 Avatar answered Jan 03 '23 19:01

wn32v1.0


I would recommend you to run gradle build command in your terminal. After this, do a gradle sync.

Must be some problem with your IDE.

Hope this solves your issue.

like image 31
Harshith Patte Avatar answered Jan 03 '23 17:01

Harshith Patte


Accepted answer didn't work for me. I am able to resolve this after adding settings.gradle file in project root with,

settings.gradle:

pluginManagement {
    repositories {
        maven { url "<Repo_URL>" }
    }
}
like image 41
Vasanth Subramanian Avatar answered Jan 03 '23 17:01

Vasanth Subramanian


In my case I had configured a proxy from my job in the gradle.properties file, but I wasn't through their VPN.

If this is also your case, you can just comment the lines in that file, or just connect to the VPN if it is possible.

like image 24
Alejandro Avatar answered Jan 03 '23 18:01

Alejandro