阿里云的maven central地址

仓库服务

仓库名称

阿里云仓库地址

阿里云仓库地址(老版)

源地址

central

https://maven.aliyun.com/repository/central

https://maven.aliyun.com/nexus/content/repositories/central

https://repo1.maven.org/maven2/

public

https://maven.aliyun.com/repository/public

https://maven.aliyun.com/nexus/content/groups/public

central仓和jcenter仓的聚合仓

gradle-plugin

https://maven.aliyun.com/repository/gradle-plugin

https://maven.aliyun.com/nexus/content/repositories/gradle-plugin

https://plugins.gradle.org/m2/

apache snapshots

https://maven.aliyun.com/repository/apache-snapshots

https://maven.aliyun.com/nexus/content/repositories/apache-snapshots

https://repository.apache.org/snapshots/

gradle 配置指南

在 build.gradle 文件中加入以下代码:

allprojects {
  repositories {
    maven {
      url 'https://maven.aliyun.com/repository/public/'
    }
    mavenLocal()
    mavenCentral()
  }
}

如果想使用其它代理仓,以使用 central 仓为例,代码如下:

allprojects {
  repositories {
    maven {
      url 'https://maven.aliyun.com/repository/public/'
    }
    maven {
      url 'https://maven.aliyun.com/repository/central'
    }
    mavenLocal()
    mavenCentral()
  }
}

加入你要引用的文件信息:

dependencies {
  compile '[GROUP_ID]:[ARTIFACT_ID]:[VERSION]'
}

执行命令:

gradle dependencies 或 ./gradlew dependencies 安装依赖
  • 9
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值