关于项目构建报错Using insecure protocols with repositories

3,232 阅读1分钟
问题:

项目构建是报错:Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven(XXX)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols.

解决方法
  • 1 添加关键字 allowInsecureProtocol
maven {
            allowInsecureProtocol = true
            url 'xxx'
}
  • 2 maven 地址url 由http改为https