解决Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven

1、在C:\Users\XXX\.gradle的init.gradle文件中添加一行代码:allowInsecureProtocol = true(切记有等于号)

maven {

allowInsecureProtocol = true //就是这一行}

2、在项目的根目标下的build.gradle中修改:allowInsecureProtocol true(切记无等于号),此外将http改为https

maven {allowInsecureProtocol true //就是这一行url 'https://maven.aliyun.com/nexus/content/groups/public/'}

你可能感兴趣的:(maven,java)