-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed as not planned
Closed as not planned
Copy link
Labels
closed:not-fixedIndicates the issue was not fixed and is not planned to beIndicates the issue was not fixed and is not planned to be
Description
Expected Behavior
If distribution URL returns a 301 or 302 status code with a Location header, the wrapper should retry the request with the URL returned in the Location header.
Redirects should be followed recursively (until a reasonable upper bound in the count of redirects is reached).
Current Behavior
If the configured distribution url returns a 301 or 302 the wrapper fails:
Downloading http://my-local-dist-mirror.example.com/gradle-4.8.1-all.zip
Could not unzip C:\Users\reegnz\.gradle\wrapper\dists\gradle-4.8.1-all\2fm1bdco840fg368obqx86w8g\gradle-4.8.1-all.zip to C:\Users\reegnz\.gradle\wrapper\dists\gradle-4.8.1-all\2fm1bdco840fg368obqx86w8g.
Reason: error in opening zip file
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:225)
at java.util.zip.ZipFile.<init>(ZipFile.java:155)
at java.util.zip.ZipFile.<init>(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:218)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:75)
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:61)
Context
We had the distribution available through http in the past.
Recently we changed the server to redirect all requests on port 80 to try again with https.
This broke the gradle wrapper downloads in our CI.
Steps to Reproduce (for bugs)
- Have a webserver that redirects from a specific url to the gradle wrapper location
- Configure gradle wrapper with that url
dbalakirev and timbicker
Metadata
Metadata
Assignees
Labels
closed:not-fixedIndicates the issue was not fixed and is not planned to beIndicates the issue was not fixed and is not planned to be