1. Download the website
http://maven.apache.org/download.cgi#
2. Unzip
3. Configure Environment variables
Configure the Java_home environment variables before you configure the MAVEN environment variables
Select My Computer----Right-click Properties---Advanced system settings---environment variables
3.1 New environment variable M2_home variable value: Extract the address of the file to the previous level of the bin
3.2 Add%m2_home%\bin to the PATH environment variable, as shown in the Win10 interface, if not the interface, to be added;
4. Verification
Win+r----"cmd---" input mvn-v appears as shown below, indicating successful installation
5.Maven configuration file
5.1 Modifying the Local repository
After the decompression is installed, the default repository for MAVEN is in the ${user.home}/.m2/repository file.
1. Open the Settings.xml in the Conf folder, find <localRepository> Remove comments, modify the content to the new warehouse directory (for example: My new warehouse address is: E:\Maven\repository). Create a new warehouse directory before modifying the configuration file
2. Updating the Local warehouse
Win+r----"cmd---" Input mvn help:system
Maven puts the new jar package into the modified path
5.2 Configuring the MAVEN image Warehouse
Most of the jar packages will be wall-down, and configuring a mirrored warehouse can be a good solution to this problem
Find <mirrors> in Settings.xml, recommended configuration of Ali's Mirror station, paste the following code overlay can be
<
mirror
>
<
id
>nexus-aliyun</
id
>
<
name
>Nexus aliyun</
name
>
<
url
>http://maven.aliyun.com/nexus/content/groups/public/</
url
>
<
mirrorOf
>central</
mirrorOf
>
</
mirror
>
Installing MAVEN and modifying configuration items under Windows