Plugin with id 'spring-boot' not found


(Amit) #1

Hi when i trying to build the project i am getting below error

* What went wrong:
A problem occurred evaluating root project 'recommender'.
> Plugin with id 'spring-boot' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

build.gradle file:

buildscript {
	ext {
		springBootVersion = '1.3.3.RELEASE'
	}
	repositories {
		mavenCentral()	   
	}
	dependencies {
		classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
	}
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'

jar {
	baseName = 'recommender'
	version = '0.0.1-SNAPSHOT'
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
	mavenCentral()	
}

dependencies {
	compile('org.springframework.boot:spring-boot-starter-web')
	compile ('com.rabbitmq:amqp-client:3.6.1')
}

Please help …

i even try by changing the apply plugin: ‘org.springframework.boot.gradle.SpringBootPlugin’

but this also doesn’t work


(Stefan Oehme) #2

I copy-pasted your exact example and it works fine for me. What version of Gradle are you using?


(Amit) #3

Gradle Version :2.13


(Stefan Oehme) #4

That’s the version I used too, I don’t get any error. Can you create a public Github repo with a project that reproduces the issue?


(Amit) #5

Did u run on window system 64 bit


(Stefan Oehme) #6

The operating system is highly unlikely to make a difference in whether a plugin can be found. Please provide a reproducible example.


(Barry Hargan) #7

Has anyone found a solution to this issue. mine originally was where it couldnt resolve the aritifacts for ‘:classpath’ and after reworking the build.gradle file i am getting this exact issue and my work has grinded to halt in the last week as im the only one in my team that is experiencing this issue. Anyone with any ideas would be much appreciated.

(also im using Gradle version 4.9, JDK 8 and SpringBootVersion is 1.4.2.RELEASE)


(许清海) #8

try
ext { springBootVersion = ‘1.4.2.RELEASE’ }


(Barry Hargan) #9

That is how I have it in my build.gradle