I upgraded from version 5.4.1 to 7.4.2 using the command ./gradlew wrapper --gradle-version=7.4.2
Consequently, my Jenkins build began failing on the command ./gradlew clean build publish '-Pversion=2.1.117'
It looks like something may be pointing to a bad URL. Would be very grateful for any guidance:
Downloading https://services.gradle.org/distributions/gradle-7-4-2-bin.zip
Exception in thread "main" java.io.FileNotFoundException: https://downloads.gradle-dn.com/distributions/gradle-7-4-2-bin.zip
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1915)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:251)
at org.gradle.wrapper.Download.downloadInternal(Download.java:87)
at org.gradle.wrapper.Download.download(Download.java:67)
at org.gradle.wrapper.Install$1.call(Install.java:68)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)```
Do you have something in the build that customizes the wrapper task? It appears to have generated an incorrect URL in the gradle-wrapper.properties file.
https://services.gradle.org/distributions/gradle-7-4-2-bin.zip
should be https://services.gradle.org/distributions/gradle-7.4.2-bin.zip
I thought maybe you accidentally typed the wrong version in when running the wrapper task, but gradle prevents that:
./gradlew wrapper --gradle-version=7-4-2
FAILURE: Build failed with an exception.
* What went wrong:
'7-4-2' is not a valid Gradle version string (examples: '1.0', '1.0-rc-1')