关于Maven配置阿里云仓库(模板)

Maven配置阿里云仓库

使用Idea创建maven项目会出现没有settings.xml的情况,需要在
C:\Users\{你的用户名}.m2 下创建 settings.xml 文件。
附上模板:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
        <!-- 阿里云仓库 -->
        <mirror>
			<id>nexus-aliyun</id>
			<mirrorOf>*</mirrorOf>
			<name>Nexus aliyun</name>
			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
		</mirror>
    </mirrors> 
</settings>

猜你喜欢

转载自blog.csdn.net/qq_42030932/article/details/83350089