@2020 配置阿里云镜像和本地仓库 maven配置环境变量,
1.使用idea的maven
2.配置maven环境变量
4、验证是否安装完成,运行cmd,输入mvn -v,显示maven版本则成功。
3.配置阿里云镜像
1找到maven的settings.xml文件打开
<localRepository>D:\Tomcat\.m2\repository</localRepository>
3.配置阿里云镜像mirrors标签下
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>