[导读]:maven 配置指南 打开 maven 的配置文件( windows 机器一般在 maven 安装目录的 conf/settings.xml ),在 mirrors/mirrors 标签中添加 mirror 子节点: mirror id aliyunmaven / id mirrorOf * / mirrorOf name 阿里云公共仓库 ...
maven 配置指南
打开 maven 的配置文件( windows 机器一般在 maven 安装目录的 conf/settings.xml ),在
<mirror>
<id>aliyunmavenid>
<mirrorOf>*mirrorOf>
<name>阿里云公共仓库name>
<url>https://maven.aliyun.com/repository/publicurl>
mirror>
如果想使用其它代理仓库,可在
<repository>
<id>springid>
<url>https://maven.aliyun.com/repository/springurl>
<releases>
<enabled>trueenabled>
releases>
<snapshots>
<enabled>trueenabled>
snapshots>
repository>
在你的 pom.xml 文件
<dependency>
<groupId>[GROUP_ID]groupId>
<artifactId>[ARTIFACT_ID]artifactId>
<version>[VERSION]version>
dependency>
执行拉取命令:
mvn install
本文来自E先生的博客,如若转载,请注明出处:https://javajz.cn
留言区