报错信息

* What went wrong:
A problem occurred configuring root project 'MyApp'.
> Could not resolve all files for configuration ':classpath'.
   > Could not download jimfs.jar (com.google.jimfs:jimfs:1.1)
      > Could not get resource 'https://plugins.gradle.org/m2/com/google/jimfs/jimfs/1.1/jimfs-1.1.jar'.
         > Could not HEAD 'https://plugins.gradle.org/m2/com/google/jimfs/jimfs/1.1/jimfs-1.1.jar'.
            > Connect to d29vzk4ow07wi7.cloudfront.net:443 [d29vzk4ow07wi7.cloudfront.net/54.192.84.6, d29vzk4ow07wi7.cloudfront.net/54.192.84.168, d29vzk4ow07wi7.cloudfront.net/54.192.84.128, d29vzk4ow07wi7.cloudfront.net/54.192.84.173] failed: Read timed out

修改配置

Gradle的默认仓库:

修改默认仓库为其他可用镜像。

在根目录的settings.gradle中添加pluginManagement节点注意:必须放置在rootProject.name属性前。

pluginManagement {
    repositories {
        maven {
            url 'http://examle.com/maven-repo'
        }
        gradlePluginPortal()
    }
}

rootProject.name = 'test-project-name'

这个时候再运行 gradle --debug 地址已经变了,但是代理好像还没生效

Performing HTTP GET: https://maven.aliyun.com/repository/gradle-plugin/org/springframework/boot/org.springframework.boot.gradle.plugin/2.4.2/org.springframework.boot.gradle.plugin-2.4.2.pom


相关文章:

  • 2021-06-22
  • 2021-11-25
  • 2022-12-23
  • 2021-05-27
  • 2022-02-25
  • 2021-08-07
  • 2021-08-07
猜你喜欢
  • 2022-02-10
  • 2022-12-23
  • 2021-12-06
  • 2021-06-15
  • 2021-11-26
相关资源
相似解决方案