Spring-boot dependency does not work with gradle

I follow the tutorial at http://spring.io/guides/gs/messaging-rabbitmq/ and first tried gradle with it. The script throws an error when I turn on the dependency spring-boot. Here is a snippet from my build.gradle file:

    buildscript {
        repositories {
            mavenCentral()
        }
        dependencies {
            classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.3.RELEASE")
        }
    }

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

$ gradle tasks fails with an error:

  A problem occurred evaluating root project 'rabbit-mq-example'.
> org.gradle.api.tasks.TaskContainer.create(Ljava/lang/String;Ljava/lang/Class;)Lorg/gradle/api/Task;

This points to a string apply plugin: 'spring-boot'when I run it using a flag --debug. Any help would be greatly appreciated.

+4
source share
1 answer

From the link you provided, requirements for spring-boot:

  • JDK 1.6 or later
  • Gradle 2.3+ or Maven 3.0+
+3
source

All Articles