我无法让 Gradle 包装器从 Artifactory 实例下载 -bin.zip 文件。我想通过我们的 Artifactory 工件管理器分发我的公司修改(添加的初始化脚本)版本的 Gradle,但从 Artifactory 服务器收到 502 错误。不幸的是,Artifactory 服务器的日志中对此请求没有任何用处。http://testlab3:8081/artifactory/simple/ext-release-local/gradle/gradle/1.4/gradle-1.4-bin.zip
如果我将文件输入到位置栏中,我已经验证我的浏览器可以成功并完全下载文件。
这是相关的关闭:
task wrapper(type: Wrapper) {
distributionUrl = 'http://testlab3:8081/artifactory/simple/ext-release-local/gradle/gradle/1.4/gradle-1.4-bin.zip'
}
然后我执行
$gradle wrapper
这是我尝试使用包装器时得到的跟踪:
c:\Development\Intellij\projectName>gradlew tasks
Downloading http://testlab3:8081/artifactory/simple/ext-release-local/gradle/g
radle/1.4/gradle-1.4-bin.zip
Exception in thread "main" java.io.IOException: Server returned HTTP response co
de: 502 for URL: http://testlab3:8081/artifactory/simple/ext-release-local/gra
dle/gradle/1.4/gradle-1.4-bin.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1612)
at org.gradle.wrapper.Download.downloadInternal(Download.java:63)
at org.gradle.wrapper.Download.download(Download.java:49)
at org.gradle.wrapper.Install.createDist(Install.java:51)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
有人有建议吗?