Maven 镜像

简介

阿里云Maven中央仓库阿里云云效提供的公共代理仓库,帮助研发人员提高研发生产效率,使用阿里云Maven中央仓库作为下载源,速度更快更稳定。
阿里云云效 是企业级一站式 DevOps 平台,覆盖产品从需求到运营的研发全生命周期,其中云效也提供了免费、可靠的Maven私有仓库Packages,欢迎您体验使用。

下载地址: https://maven.aliyun.com/

配置方法

Maven 配置

打开 Maven 的配置文件(windows机器一般在maven安装目录的conf/settings.xml),在<mirrors></mirrors>标签中添加 mirror 子节点:

<mirror>
    <id>aliyunmaven</id>
    <mirrorOf>*</mirrorOf>
    <name>阿里云公共仓库</name>
    <url>https://maven.aliyun.com/repository/public</url>
</mirror>

如果想使用其它代理仓库,可在<repositories></repositories>节点中加入对应的仓库使用地址。以使用spring代理仓为例:

<repository>
    <id>spring</id>
    <url>https://maven.aliyun.com/repository/spring</url>
    <releases>
        <enabled>true</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>

gradle 配置

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

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

如果想使用 maven.aliyun.com 提供的其它代理仓,以使用 spring 仓为例,代码如下:

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

相关链接

特别声明:本镜像站内容来自第三方网站,阿里云会尽力审核镜像内容安全,但无法保证其完全合规,请您在下载前慎重考虑。具体请查看《阿里云开发者社区用户服务协议》、《阿里云镜像站特别条款》等。 如您发现镜像站有任何问题,可以填写镜像站投诉表单举报,我们将按照法律规定尽快进行处理。

推荐关注:
· 手慢无!云服务器免费领取,实时计算净省3258元 · 每周二看直播,学最新阿里开源技术

评论

登录后可评论
头像
zaghost
2023-08-07
<mirrorOf>*</mirrorOf>会把加的私有仓库也给代理 最好改成<mirrorOf>central,jcenter</mirrorOf>
游客37r2azsqoiqce、玖语巴黎、q792602257、游客nraj27dx2kwek、游客6hxncs5amz2ua觉得很赞
Shape Created with Sketch. 9 Combined Shape Created with Sketch. 1
2025-02-21
能具体一点吗&lt;url&gt;https://maven.aliyun.com/repository/public&lt;/url&gt;要不要改
Shape Created with Sketch. Combined Shape Created with Sketch.
头像
pandora-boot下架了吗
Shape Created with Sketch. Combined Shape Created with Sketch.
头像
quarkus项目提示public仓库找不到相关模块,切换成华为云就没问题了!
Shape Created with Sketch. Combined Shape Created with Sketch.
头像
spring-cloud-starter-netflix-hystrix-2.2.3-release 为啥没有这个
Shape Created with Sketch. Combined Shape Created with Sketch.
头像
您好,我昨天在maven公共central仓库发布了一个依赖,24小时后发现阿里云并没有更新我发布的依赖,依然保持旧版本,我的发布信息如下: top.chukongxiang:spring-cache,公共仓库地址:https://repo1.maven.org/maven2/top/chukongxiang/spring-cache/,希望能够同步
Shape Created with Sketch. Combined Shape Created with Sketch.
头像
guang027
2022-04-14
加一个sbt的配置项说明呗。。。
Shape Created with Sketch. Combined Shape Created with Sketch.
头像
为什么不跟新了?
Shape Created with Sketch. Combined Shape Created with Sketch.
头像
maven镜像库最近怎么不更新了
tomcat.cn觉得很赞
Shape Created with Sketch. 1 Combined Shape Created with Sketch.
头像
maven 有些包下载不了
游客2zob7ognwubto、knnj7xws3jokq觉得很赞
Shape Created with Sketch. 2 Combined Shape Created with Sketch.
头像
为什么maven镜像不更新了?
Shape Created with Sketch. Combined Shape Created with Sketch.
镜像站 + 订阅

阿里巴巴镜像站技术社区

域名使用规则
  • 公网访问地址:

    https://mirrors.aliyun.com/

  • ECS VPC网络访问地址:

    http://mirrors.cloud.aliyuncs.com/

  • ECS 经典网络访问地址:

    http://mirrors.aliyuncs.com/

对于镜像有任何问题,欢迎给我们提问题!
立即提问
热门体验场景
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等