idea使用maven安装并配置阿里云中央仓库

1.下载maven

下载地址:http://maven.apache.org/download.cgi

2.解压文件(我放在D盘)

3.配置maven环境

在path里面添加  "根目录下/bin"

4.新建一个本地仓库(我在根目录下/repo)

5.配置仓库和阿里云中央仓库

在根目录下/conf/settings.xml下增加代码

<mirrors>
	 <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>  
  </mirrors>

#localRepository这个是你刚才新建repo的位置
  <localRepository>D:\Java\apache-maven-3.5.4\repo</localRepository>

6.大功告成然后输入cmd命令看看吧

mvn -v
mvn help:system

如果出现我这个样子的就是成功咯



7.最后把自己的maven配置到Intellij IDEA上面

位置:file-settings-maven

猜你喜欢

转载自blog.csdn.net/jav_zhangwei/article/details/81175782