I haven’t been looking at my gradle build for a while. I’m on Win7, using Gradle 2.4, Groovy 2.3.10, and Java 7. I work behind a non-authenticated proxy. All my proxy settings are set correctly in my environment, including wget and curl. In my ~/.gradle/wrapper/dists folder, I have several versions of Gradle, including 2.2, 2.2.1, 2.3, and 2.4.
When I try to run my build, it fails with errors like this:
09:36:39.798 [DEBUG] [TestEventLogger] Downloading https://services.gradle.org/distributions/gradle-2.4-bin.zip
...
09:37:00.204 [DEBUG] [TestEventLogger] Caused by:
09:37:00.204 [DEBUG] [TestEventLogger] org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-2.4-bin.zip'.
...
09:37:00.207 [DEBUG] [TestEventLogger] Caused by:
09:37:00.207 [DEBUG] [TestEventLogger] java.net.ConnectException: Connection timed out: connect
I’ve run into this before, and I believe it simply required running this from outside of the proxy, and once it succeeds once, I don’t have to do it again.
I have no trouble getting to this url from wget, curl, or my browser.
I guess there are two issues here. First, Gradle is obviously failing to connect to the internet, most likely because it’s not properly integrating proxy information. Second, I’m not sure WHY it’s trying to download the Gradle 2.4 distribution. It’s already in my wrapper dists, and it’s obviously in my PATH (although I’m sure that last part is irrelevant).
I set my GRADLE_HOME to point to Gradle 2.4 a while ago. My proxy settings have been in ~/.gradle/gradle.properties for a long time. I haven’t had any trouble downloading dependencies. It’s only this Gradle distribution download that fails.
Note that I’m only setting the host and port properties. It’s unauthenticated, and I didn’t bother to set nonProxyHosts.
Never mind. I have a short memory. The last time this happened, I finally realized this was a problem with the nebula-test plugin. I’ll just update the issue I filed the first time.