Gradle 2.4 can't resolve transitive dependencies of gradle-git 1.1.0

Attempting to run the Griffon build (https://github.com/griffon/griffon) with Gradle 2.4 (downloaded with GVM 2.4.1) results in unresolved dependencies. The same build works perfectly well with Gradle 2.3


Gradle 2.4

Build time: 2015-05-05 08:09:24 UTC
Build number: none
Revision: 5c9c3bc20ca1c281ac7972643f1e2d190f2c943c

Groovy: 2.3.10
Ant: Apache Ant™ version 1.9.4 compiled on April 29 2014
JVM: 1.8.0_45 (Oracle Corporation 25.45-b02)
OS: Mac OS X 10.9.5 x86_64

Stacktrace follows:

* What went wrong:
A problem occurred configuring root project 'griffon'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve org.eclipse.jgit:org.eclipse.jgit:3.7.0.201502260915-r.
     Required by:
         org.codehaus.griffon:griffon:2.3.0-SNAPSHOT > org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1
      > Could not resolve org.eclipse.jgit:org.eclipse.jgit:3.7.0.201502260915-r.
         > Could not parse POM https://jcenter.bintray.com/org/eclipse/jgit/org.eclipse.jgit/3.7.0.201502260915-r/org.eclipse.jgit-3.7.0.201502260915-r.pom
            > Could not resolve org.eclipse.jgit:org.eclipse.jgit-parent:3.7.0.201502260915-r.
               > Could not resolve org.eclipse.jgit:org.eclipse.jgit-parent:3.7.0.201502260915-r.
                  > Could not get resource 'https://jcenter.bintray.com/org/eclipse/jgit/org.eclipse.jgit-parent/3.7.0.201502260915-r/org.eclipse.jgit-parent-3.7.0.201502260915-r.pom'.
                     > Could not HEAD 'https://jcenter.bintray.com/org/eclipse/jgit/org.eclipse.jgit-parent/3.7.0.201502260915-r/org.eclipse.jgit-parent-3.7.0.201502260915-r.pom'.
                        > Connection reset
   > Could not resolve com.github.zafarkhaja:java-semver:0.8.0.
     Required by:
         org.codehaus.griffon:griffon:2.3.0-SNAPSHOT > org.ajoberstar:gradle-git:1.1.0
      > Could not resolve com.github.zafarkhaja:java-semver:0.8.0.
         > Could not parse POM https://jcenter.bintray.com/com/github/zafarkhaja/java-semver/0.8.0/java-semver-0.8.0.pom
            > Could not resolve org.sonatype.oss:oss-parent:9.
               > Could not resolve org.sonatype.oss:oss-parent:9.
                  > Could not get resource 'https://jcenter.bintray.com/org/sonatype/oss/oss-parent/9/oss-parent-9.pom'.
                     > Could not HEAD 'https://jcenter.bintray.com/org/sonatype/oss/oss-parent/9/oss-parent-9.pom'.
                        > Connection reset
   > Could not resolve com.thoughtworks.xstream:xstream:1.4.7.
     Required by:
         org.codehaus.griffon:griffon:2.3.0-SNAPSHOT > com.github.ben-manes:gradle-versions-plugin:0.9
      > Could not resolve com.thoughtworks.xstream:xstream:1.4.7.
         > Could not parse POM https://jcenter.bintray.com/com/thoughtworks/xstream/xstream/1.4.7/xstream-1.4.7.pom
            > Could not resolve com.thoughtworks.xstream:xstream-parent:1.4.7.
               > Could not resolve com.thoughtworks.xstream:xstream-parent:1.4.7.
                  > Could not get resource 'https://jcenter.bintray.com/com/thoughtworks/xstream/xstream-parent/1.4.7/xstream-parent-1.4.7.pom'.
                     > Could not HEAD 'https://jcenter.bintray.com/com/thoughtworks/xstream/xstream-parent/1.4.7/xstream-parent-1.4.7.pom'.
                        > Connection reset
   > Could not resolve org.eclipse.jgit:org.eclipse.jgit:3.7.0.201502260915-r.
     Required by:
         org.codehaus.griffon:griffon:2.3.0-SNAPSHOT > org.ajoberstar:gradle-git:1.1.0 > org.ajoberstar:grgit:1.1.0
      > Could not resolve org.eclipse.jgit:org.eclipse.jgit:3.7.0.201502260915-r.
         > Could not parse POM https://jcenter.bintray.com/org/eclipse/jgit/org.eclipse.jgit/3.7.0.201502260915-r/org.eclipse.jgit-3.7.0.201502260915-r.pom
            > Could not resolve org.eclipse.jgit:org.eclipse.jgit-parent:3.7.0.201502260915-r.
               > Could not resolve org.eclipse.jgit:org.eclipse.jgit-parent:3.7.0.201502260915-r.
                  > Could not get resource 'https://jcenter.bintray.com/org/eclipse/jgit/org.eclipse.jgit-parent/3.7.0.201502260915-r/org.eclipse.jgit-parent-3.7.0.201502260915-r.pom'.
                     > Could not HEAD 'https://jcenter.bintray.com/org/eclipse/jgit/org.eclipse.jgit-parent/3.7.0.201502260915-r/org.eclipse.jgit-parent-3.7.0.201502260915-r.pom'.
                        > Connection reset
   > Could not resolve org.eclipse.jgit:org.eclipse.jgit.ui:3.7.0.201502260915-r.
     Required by:
         org.codehaus.griffon:griffon:2.3.0-SNAPSHOT > org.ajoberstar:gradle-git:1.1.0 > org.ajoberstar:grgit:1.1.0
      > Could not resolve org.eclipse.jgit:org.eclipse.jgit.ui:3.7.0.201502260915-r.
         > Could not parse POM https://jcenter.bintray.com/org/eclipse/jgit/org.eclipse.jgit.ui/3.7.0.201502260915-r/org.eclipse.jgit.ui-3.7.0.201502260915-r.pom
            > Could not resolve org.eclipse.jgit:org.eclipse.jgit-parent:3.7.0.201502260915-r.
               > Could not resolve org.eclipse.jgit:org.eclipse.jgit-parent:3.7.0.201502260915-r.
                  > Could not get resource 'https://jcenter.bintray.com/org/eclipse/jgit/org.eclipse.jgit-parent/3.7.0.201502260915-r/org.eclipse.jgit-parent-3.7.0.201502260915-r.pom'.
                     > Could not HEAD 'https://jcenter.bintray.com/org/eclipse/jgit/org.eclipse.jgit-parent/3.7.0.201502260915-r/org.eclipse.jgit-parent-3.7.0.201502260915-r.pom'.
                        > Connection reset

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

BUILD FAILED

Total time: 3.62 secs

I see a “Connection reset” in your stack trace. Temporary network issues?

Executing gradle dependencies for the following build script works fine for me. Also, with the --refresh-dependencies command line option.

apply plugin: 'java'

repositories {
    jcenter()
}

dependencies {
    compile 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1'
}

Dependencies can be resolved if they are project dependencies (like your sample code) but fail if they are defined as build dependencies (inside buildscript).

That works for me as well:

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1'
    }
}

Can you try to delete your ~/.gradle/caches directory and try again?

I’ll try once again I have a better network connection. Then again, the build works without any problems if running with Gradle 2.3 :’(

OK, removing the cache makes it work (albeit there was another network reset hiccup, this time over a modem connection). I still think there’s something weird in Gradle 2.4; you should not need to wipe out the caches.

Perhaps my Gradle 2.3 cache became unstable and Gradle 2.4 is more strict?

I agree. You shouldn’t have to wipe out your cache. At the moment I do not know what your issue was to be honest.