5
votes

I created a spring mvc project on Intellij IDE, when i build my project, some message is displayed. How can i resolve it?

This is message displayed:

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
4
The Gradle central plugin repository definitely has that plugin (here). Are you sure you had a working internet connection when you tried to run?user31601
Thank your answer, my computer is still connected to the internet while building the project, but the result is the same.marcus-nguyen
Check if you need a proxy to access the internet. Otherwise do you have a settings.xml properly configured in your local .m2 config. You maybe need a definition to maven central repo....vikingsteve
Yes, my proxy has been blocked, my IT has opened the proxy for me.Thank youmarcus-nguyen

4 Answers

5
votes

In my case, the issue was incorrect Gradle JVM version had to be changed in the gradle settings.

On changing the gradle JVM version to the Project's JVM version, this error got resolved.

enter image description here

4
votes

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()
    }
}
1
votes

I checked my proxy, it only access to a number of pages so the situation is on, after contacting technical staff, it worked.

0
votes

You can be missing a plugin repository as mentioned by other people. In a corporate environment if custom plugins can be presented in build files then a plugin repository URL, user & pass need to be set somehow. The easiest way to do that is through a file ~/.gradle/gradle.properties and a snippet adding that custom repo in projects's settings.gradle.