代理
gradle.properties
systemProp.http.proxyHost=
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=
systemProp.http.proxyPassword=
systemProp.https.proxyHost=
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=
systemProp.https.proxyPassword=
repo镜像
repositories {
maven { url "http://cmc-cd-mirror.rnd.huawei.com/maven/" }
}
注 内网地址
外网可以使用
maven { url 'https://mirrors.huaweicloud.com/repository/maven/' }
内网代理环境下 连接 repo.spring.io/libs-release 返回 407
报错信息:
Could not GET 'https://repo.spring.io/libs-release/io/projectreactor/reactor-bom/Californium-BUILD-SNAPSHOT/maven-metadata.xml'. Received status code 407 from server: authenticationrequired
Enable Gradle 'offline mode' and sync project
gradle.build中使用了
maven { url "https://repo.spring.io/libs-release" }
解决方案:
.gradlew build --debug 检查 代理连接正常
将 maven { url "https://repo.spring.io/libs-release" } 替换为 maven { url "https://repo.spring.io/libs-release" }
idea gradle下载慢问题
使用浏览器下载,后解压到目录中
https://services.gradle.org/distributions