1.下载:

  官网下载maven  

  开发选择bin版本即可,src为源码

2.配置setting.xml

  需要配置: 镜像 jdk版本 自定义仓库位置

<?xml version="1.0" encoding="utf-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">  
  <localRepository>D:\java工具\apache-maven-3.8.4\repo</localRepository>  
  <pluginGroups></pluginGroups>  
  <proxies></proxies>  
  <servers></servers>  
  <mirrors> 
    <mirror> 
      <id>nexus-aliyun</id>  
      <mirrorOf>*</mirrorOf>  
      <name>Nexus aliyun</name>  
      <url>http://maven.aliyun.com/nexus/content/groups/public</url> 
    </mirror> 
  </mirrors>  
  <profiles> 
    <profile> 
      <id>jdk18</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> 
  </profiles>  
  <activeProfiles> 
    <activeProfile>jdk18</activeProfile> 
  </activeProfiles> 
</settings>

复制替换即可,我将其内部注释全部去掉(因为看着乱)了

3.配合maven的环境变量

  

 

 

 

4.cmd测试即可