一、Maven下载
Maven官网
![Maven官网下载](https://i-blog.csdnimg.cn/blog_migrate/21e1e35be81c4a26e24987ea32e734dd.png#pic_center)
二、配置环境(Mac版本)
open .bash_profile
MAVEN_HOME=/Volumes/ZhangUser/apache-maven-3.9.6
export MAVEN_HOME
PATH=${MAVEN_HOME}/bin:$PATH
export PATH
source .bash_profile
echo $MAVEN_HOME
mvn -v
三、配置本地仓库及镜像
<localRepository>/Volumes/ZhangUser/JD-Maven</localRepository>
<mirrors>
<mirror>
<id>repo1</id>
<mirrorOf>*</mirrorOf>
<name>Maven Central repository 1</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
<mirror>
<id>repo2</id>
<mirrorOf>*</mirrorOf>
<name>Maven Central repository 2</name>
<url>https://repo2.maven.org/maven2/</url>
</mirror>
<mirror>
<id>jcenter</id>
<mirrorOf>*</mirrorOf>
<name>jcenter</name>
<url>https://jcenter.bintray.com/</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
<mirror>
<id>central</id>
<name>Maven Central</name>
<url>https://repo.maven.apache.org/maven2</url>
<mirrorOf>*</mirrorOf>
</mirror>
<mirror>
<id>huaweicloud</id>
<name>maven</name>
<mirrorOf>*</mirrorOf>
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
</mirror>
<mirror>
<id>nexus-tencentyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus tencentyun</name>
<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
</mirror>
</mirrors>