Prasoon Joshi
Prasoon Joshi

Reputation: 799

Spring-boot dependency not working with gradle

I'm following the tutorial at http://spring.io/guides/gs/messaging-rabbitmq/ and trying out gradle for the first time along with it. The script is throwing an error when I include the spring-boot dependency. Here's the 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 the 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 at the line apply plugin: 'spring-boot' when I run it with the --debug flag. Any help would be greatly appreciated.

Upvotes: 5

Views: 3820

Answers (1)

frhd
frhd

Reputation: 10284

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

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

Upvotes: 4

Related Questions