Gradle Core Plugins (plugin is not in 'org.gradle' namespace)

Getting Gradle build error,
Even after changing the org.springframework.boot version that’s available in the Gradle Plugin repository, we are getting the same error. What could be the possible reason for the error?

How could we troubleshoot the issue? Any suggestion?


* What went wrong:
Plugin [id: 'org.springframework.boot', version: '2.6.2'] 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.6.2')
  Searched in the following repositories:
    Gradle Central Plugin Repository

build.gradle => artifactory url defined in repository is accessible

plugins {
	id 'org.springframework.boot' version '2.6.2'
	id 'io.spring.dependency-management' version '1.0.11.RELEASE'
	id 'java'
	id 'jacoco'
	id "org.sonarqube" version "3.3"
	id "com.gorylenko.gradle-git-properties" version "2.4.1"
}
...
repositories {
    mavenCentral()
    maven {
        url "artifactory-url"
        credentials {
                
            }
        allowInsecureProtocol = true
    }
}

setting.gradle

rootProject.name = 'project-name'

What could be the possible reason for the error?

Some points:

  • firewall blocking access to Gradle Plugin Portal
  • proxy needed but not configured
  • broken Java distribution that cannot open the HTTPS connection properly

The artifactory url is irrelevant, because you didn’t declare the artifactory as plugin repository, only as repository for your project dependencies.

Sidenote: You should remove the Spring dependency management plugin and instead use the built-in BOM support using platform(...).

Thank you for the input. I would check the firewall and proxy settings.