阿里云仓库官网:https://maven.aliyun.com/mvn/guide
maven 配置指南(此处引用官网教程):
打开 maven 的配置文件( windows 机器一般在 maven 安装目录的 conf/settings.xml ),在标签中添加 mirror 子节点:
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
如果想使用其它代理仓库,可在节点中加入对应的仓库使用地址。以使用 spring 代理仓为例:
<repository>
<id>spring</id>
<url>https://maven.aliyun.com/repository/spring</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
在你的 pom.xml 文件节点中加入你要引用的文件信息:
<dependency>
<groupId>[GROUP_ID]</groupId>
<artifactId>[ARTIFACT_ID]</artifactId>
<version>[VERSION]</version>
</dependency>
博客介绍了阿里云仓库官网,给出了maven配置指南。需打开maven配置文件,在特定标签中添加mirror子节点。若使用其他代理仓库,可在对应节点加入仓库地址,还以使用spring代理仓为例,说明了在pom.xml文件中加入引用文件信息的方法。
3666

被折叠的 条评论
为什么被折叠?



