I have a multi project gradle, but in my controller module gradle doesn't seem to be downloading the spring-boot dependency (or any other what-so-ever). The root gradle build runs smoothly, no errors at all, but I can't import any of the dependencies classes onto my source's.
Here are the gradle files:
Multi project's root build.gradle
apply plugin: 'idea'
subprojects {
apply plugin: 'idea'
}
// Ensure the IWS Workspace file is also deleted (this is not the default)
task cleanIdea(dependsOn: [cleanIdeaProject, cleanIdeaWorkspace, cleanIdeaModule],
type: Delete,
overwrite: true,
description: 'Cleans IDEA project files (IML, IPR, IWS)',
group: 'IDE')
task clean(description: 'Deletes the build directory produced by Gradle and the out directory produced by IntelliJ IDEA.',
group: 'build') << {
delete "${buildDir}", 'out'
}
Inner project build.gradle
def version = '0.0.1'
buildscript {
repositories {
maven { url "http://repo.spring.io/libs-snapshot" }
mavenCentral()
}
dependencies {
classpath('org.springframework.boot:spring-boot-gradle-plugin:1.3.0.RELEASE')
//classpath 'com.github.ben-manes:gradle-versions-plugin:0.3'
}
}
apply plugin: 'java' // http://www.gradle.org/docs/current/userguide/java_plugin.html
apply plugin: 'application' // http://www.gradle.org/docs/current/userguide/application_plugin.html
apply plugin: 'war' // http://www.gradle.org/docs/current/userguide/war_plugin.html
apply plugin: 'spring-boot'
springBoot {
mainClass = "com.mozart.Mozart"
}
idea.module {
}
repositories {
mavenCentral()
maven { url "http://repo.spring.io/libs-snapshot" }
}
configurations {
all {
exclude(group: 'commons-logging') // Never include commons-logging (use SLF4J instead)
exclude(group: 'log4j') // Never include log4j (use SLF4J instead)
}
}
jar.manifest {
attributes("Implementation-Title": "Mozart Web Site", "Implementation-Version": version)
}
processResources << {
// Workaround for Tomcat. Tomcat requires META-INF to be a non-empty subdirectory of
// build/classes/main in order for Servlet 3.0 Application Initializer scanning to work
copy {
// http://gradle.org/docs/current/userguide/working_with_files.html
from "src/main/resources/META-INF/dummy-file-required-by-tomcat.txt"
into "${sourceSets.main.output.classesDir}/META-INF"
}
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
}
task runService(description: 'Starts up the service using Tomcat.',
group: 'application') << {
logging.setLevel(LogLevel.INFO)
ant.java(classname: 'com.thoughtworks.learnangularjs.server.TomcatServer',
classpath: sourceSets.test.runtimeClasspath.asPath,
fork: true,
failonerror: true)
}
Edit: settings.gradle
rootProject.name = 'MozartWeb'
include 'MozartModel', 'MozartWebSite', 'MozartWebSiteClient'
Any help will be appreciated.