1、解压apache-maven-3.8.5到任何目录
2、添加环境变量
MAVEN_HOME=D:\apache-maven-3.8.5
path += %MAVEN_HOME%\bin
3、在conf目录下的settings.xml
<localRepository>D:\apache-maven-3.8.5\repository</localRepository>
4、添加mirror
<!-- 阿里云仓库 -->
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
5、添加jdk
<!-- java jdk1.8版本 -->
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
6、输入mvn help:system测试