1、下载maven
https://archive.apache.org/dist/maven
2、增加系统环境变量
MAVEN_HOME = (maven 安装目录 我的:D:\maven\apache-maven-3.6.2)
Path = %MAVEN_HOME%\bin; (在已有的Path后面新增一个值)
3、mvn --version 测试 查看即可
4、配置国内镜像源(打开D:\maven\apache-maven-3.6.2\config\setting.xml)
<mirrors>
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>
在mirrors中新增镜像地址