使用原因:
配置方法1: 在 $MAVEN_HOME/conf 下的 settings.xml 的
标签中添加如下配置:
标签中添加如下配置:
- <mirror>
- <id>alimaven
id> - <name>aliyun maven
name> - <url>http://maven.aliyun.com/nexus/content/groups/public/
url> - <mirrorOf>central
mirrorOf> -
mirror>
配置方法2: 在 pom.xml 中直接添加
- <repositories>
- <repository>
- <id>maven-ali
id> - <url>http://maven.aliyun.com/nexus/content/groups/public//
url> - <releases>
- <enabled>true
enabled> -
releases> - <snapshots>
- <enabled>true
enabled> - <updatePolicy>always
updatePolicy> - <checksumPolicy>fail
checksumPolicy> -
snapshots> -
repository> -
repositories>
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/223210.html原文链接:https://javaforall.net
