1.7-rc1: gradle wrapper is broken


(Francis Galiegue) #1

Hello,

I am trying out 1.7-rc1 (I am especially interested in TestNG’s parameterized test support) and also use the wrapper.

I modified my build file to read:

wrapper {

gradleVersion “1.7-rc1”;

}

Unfortunately it fails to download at all:

Exception in thread “main” java.lang.RuntimeException: java.io.FileNotFoundException: http://downloads.gradle.org/distributions-snapshots/gradle-1.7-rc1-bin.zip

at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)

Attempting to browse downloads.gradle.org indeed shows that the file does not exist; what is more strange is that in gradle/wrapper/gradle-wrapper.properties, this line is wrong:

distributionUrl=http://services.gradle.org/distributions-snapshots/gradle-1.7-rc1-bin.zip

There should be no ‘-snapshots’ here. But if I fix the file, it doesn’t help, it still tries to use downloads.gradle.org :confused: Full output after fixing the file:

Downloading http://services.gradle.org/distributions/gradle-1.7-rc1-bin.zip

Exception in thread “main” java.lang.RuntimeException: java.io.FileNotFoundException: http://downloads.gradle.org/distributions/gradle-1.7-rc1-bin.zip

at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)

at org.gradle.wrapper.Install.createDist(Install.java:47)

at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)

at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

Caused by: java.io.FileNotFoundException: http://downloads.gradle.org/distributions/gradle-1.7-rc1-bin.zip

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1623)

at org.gradle.wrapper.Download.downloadInternal(Download.java:59)

at org.gradle.wrapper.Download.download(Download.java:45)

at org.gradle.wrapper.Install$1.call(Install.java:60)

at org.gradle.wrapper.Install$1.call(Install.java:47)

at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)

… 3 more


(Francis Galiegue) #2

Update: it works if you ‘rm -rf gradle/ gradlew’ before running ‘gradle wrapper’…


(Luke Daley) #3

There should be a hyphen between the “rc” and the number. 1.7-rc-1


(Francis Galiegue) #4

Yup, I found out after some while… Not used to such a versioning scheme! And I’ve had it under the eyes too. No excuse.

Anyway – the “real” solution is to just remove wrapper from build.gradle since it does things automagically…