IntelliJ 14 Gradle Plugin not downloading sources for certain dependencies

I've got a Gradle project set up in IntelliJ, fairly simple:

 
buildscript {
    repositories {
        maven { url "https://repo.spring.io/libs-release" }
        mavenLocal()
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.10.RELEASE")
    }
}

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

war {
    baseName = 'project'
    version
=  '0.1.0'
}

repositories {
    mavenLocal()
    mavenCentral()
    maven { url "https://repo.spring.io/libs-release" }
}

dependencies {
    compile("org.springframework.boot:spring-boot-starter-thymeleaf",
            "org.springframework:spring-core:4.0.8.RELEASE")
    testCompile("junit:junit",
            "org.springframework:spring-test",
            "org.jsoup:jsoup:1.8.1",
            "org.hamcrest:hamcrest-core:1.3",
            "org.hamcrest:hamcrest-library:1.3",
            "org.seleniumhq.selenium:selenium-java:2.44.0")
}

task wrapper(type: Wrapper) {
    gradleVersion = '1.11'
}


And for whatever reason, it is *not* downloading sources for the majority of those dependencies (and their transititive dependencies in turn). I cannot figure it out - what do I need to do to make IntelliJ download the sources and/or JavaDocs? I know they exist on Maven Central, but no matter how often I reload the project in the Gradle tool window, or rebuild the project or make it or whatever, it simply won't download more than the 53 source JARs it already has. This is compared to the 96 JARs it has, total.

Looking at what has source and what doesn't, it's not exactly consistent:

Gradle: com.fasterxml.jackson.core:jackson-annotations:2.3.0 -- sources
Gradle: com.fasterxml.jackson.core:jackson-core:2.3.4        -- no sources
Gradle: com.fasterxml.jackson.core:jackson-databind:2.3.4    -- no sources






Gradle: commons-codec:commons-codec:1.3                      -- no sources

Gradle: commons-codec:commons-codec:1.9                      -- sources Gradle: commons-collections:commons-collections:3.2.1        -- no sources Gradle: commons-io:commons-io:2.4                            -- sources Gradle: commons-logging:commons-logging:1.1.3                -- no sources


And I know that all of those commons-* dependencies have source JARs available on Maven Central (having looked just before posting this)

Does anyone have any idea what's going wrong, or how do debug this further? I've checked the messages tool window - nothing. I've tried hunting for a log file - couldn't find one. Checked all the project files that looked relevant - nothing. Tried removing the extra repository (spring.io) - nothing. I've nuked my Gradle caches - still downloads only those source JARs it did previously.

Please sign in to leave a comment.