idea中maven换成国内源

一、自己创建settings.xml和repository文件夹,我是创建在idea所在目录
在这里插入图片描述
二、编辑settings.xml文件
在settings.xml文件中添加以下代码

<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
                        https://maven.apache.org/xsd/settings-1.0.0.xsd">
 
    <mirrors>
        <mirror>
			<id>aliyunmaven</id>
			<mirrorOf>*</mirrorOf>
			<name>阿里云公共仓库</name>
			<url>https://maven.aliyun.com/repository/public</url>
		</mirror>
    </mirrors>
	
	
</settings>

三、打开idea的settings
在这里插入图片描述
换源完毕。

发布了13 篇原创文章 · 获赞 1 · 访问量 486

猜你喜欢

转载自blog.csdn.net/weixin_43235209/article/details/104481469