To download maven,
click Download, unzip, and place it in a random directory. Here I put it in Disk D.
Configure the environment variable
MAVEN_HOME:D:\apache-maven-3.5.2.
Now start the configuration of setting.xml. The first step of configuration is the configuration of the local warehouse. Open the setting.xml. I usually configure it in the maven installation directory.
<localRepository>D:\apache-maven-3.5.2\repo</localRepository>
After configuring the local warehouse, the next step is to configure the central warehouse Alibaba Cloud
<mirror>
<id>AliMaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
Test: Open the cmd window and enter mvn -v.
At this time, maven is installed successfully