Connect to maven.google.com:443 [maven.google.com/172.217.163.46] failed: connect timed out

简介: 笔记

开发中经常遇到这个问题,由其是在最近google很多网站无法访问,打开一些工程时遇到Connect to maven.google.com:443 [maven.google.com/172.217.163.46] failed: connect timed out

解决思路就是换一个服务器,阿里云搭建了相同的maven仓库,替换一下地址就行了:

修改前

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
//      google()
        maven { url 'https://maven.google.com' }
                jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
    }
}
allprojects {
    repositories {
//      google()
        maven { url 'https://maven.google.com' }
        jcenter()
        maven { url 'http://raw.github.com/saki4510t/libcommon/master/repository/' }
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}

修改后

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
//      google()
//      maven { url 'https://maven.google.com' }
        jcenter()
        maven {
            url 'https://maven.aliyun.com/repository/google'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
    }
}
allprojects {
    repositories {
//      google()
//      maven { url 'https://maven.google.com' }
        jcenter()
//      maven { url 'http://raw.github.com/saki4510t/libcommon/master/repository/' }
        maven {
            url 'https://maven.aliyun.com/repository/google'
            name 'Google'
        }
    }
}


目录
相关文章
|
9天前
|
Java Maven
Maven编译报错:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile 解决方案
在执行Maven项目中的`install`命令时,遇到编译插件版本不匹配的错误。具体报错为:`maven-compiler-plugin:3.13.0`要求Maven版本至少为3.6.3。解决方案是将Maven版本升级到3.6.3或降低插件版本。本文详细介绍了如何下载、解压并配置Maven 3.6.3,包括环境变量设置和IDEA中的Maven配置,确保项目顺利编译。
Maven编译报错:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile 解决方案
|
5月前
|
Java Maven Spring
SpringBoot 系列之 Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resource
这篇文章描述了在使用Maven构建Spring Boot项目时遇到的`maven-resources-plugin`插件版本问题导致的编译失败,并提供了通过修改插件版本至3.1.0来解决这个问题的方法。
SpringBoot 系列之 Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resource
|
8月前
|
Java
springboot打包错误:Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resource
springboot打包错误:Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resource
96 0
|
7月前
|
Java Maven
Maven运行builder出现Failed to execute goal on projectXXXXX错误
Maven运行builder出现Failed to execute goal on projectXXXXX错误
186 7
|
8月前
|
前端开发 JavaScript Java
IDEA Maven install Failed to execute goal org.apache.maven.plugins异常处理
IDEA Maven install Failed to execute goal org.apache.maven.plugins异常处理
768 0
|
Java Maven
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4
|
8月前
|
Java Maven 开发工具
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.3.RELEASE:repac
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.3.RELEASE:repac
59 0
|
Java Maven Android开发
Maven神坑之PKIX path building failed终极解决办法
Maven神坑之PKIX path building failed终极解决办法
1721 0
Maven神坑之PKIX path building failed终极解决办法
|
Java Maven
idea中maven打包工具类 repackage failed: Unable to find main class
idea中maven打包工具类 repackage failed: Unable to find main class
370 1
|
8月前
|
Java Maven
Maven打包出错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test
Maven打包出错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test
431 0

热门文章

最新文章

推荐镜像

更多