打开 maven 的配置文件( windows 系统一般在 maven 安装目录的 conf/settings.xml )
在<profiles></profiles>标签中添加 profile子节点:
<profile>
<id>aliProfile</id>
<!-- 阿里云maven仓库 -->
<repositories>
<repository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<!--激活使用-->
<activeProfiles>
<activeProfile>aliProfile</activeProfile>
</activeProfiles>
标签:maven,groups,仓库,Maven,nexus,阿里,aliyun,content,public
From: https://www.cnblogs.com/saltish/p/16586673.html