# Gradle 5.4.1 -\> 7.4.2 publish error

**URL:** https://discuss.gradle.org/t/gradle-5-4-1-7-4-2-publish-error/44249
**Category:** Help/Discuss
**Created:** [November 11, 2022, 1:44pm UTC](https://discuss.gradle.org/t/gradle-5-4-1-7-4-2-publish-error/44249 "2022-11-11T13:44:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tptm](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@tptm](https://discuss.gradle.org/u/tptm)
#### Post date: [November 11, 2022, 1:44pm UTC](https://discuss.gradle.org/t/gradle-5-4-1-7-4-2-publish-error/44249/1 "2022-11-11T13:44:02Z")

</div>

- 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:

````gradle
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)```
````

---

<div class="post-metadata">

### Author: ![Chris\_Dore](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/chris_dore/32/7592_2.png) [@Chris\_Dore](https://discuss.gradle.org/u/Chris_Dore)
#### Post date: [November 12, 2022, 9:34am UTC](https://discuss.gradle.org/t/gradle-5-4-1-7-4-2-publish-error/44249/2 "2022-11-12T09:34:53Z")

</div>

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:

```gradle
./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')

```
