It is a blogger's honor to help you solve problems, and your support is the biggest motivation for my creation! :) Welcome to follow and like
Article Directory
1. Download Maven
Tip: Before installing, you need to confirm which version of maven you need to avoid wasting time.
Official website download:
https://maven.apache.org/download.cgi
Baidu cloud disk download:
Link: https://pan.baidu.com/s/11QMCZyOPKCHD8-dqA87wHA
Extraction code: 1we2
Official website download tutorial
1. First open https://maven.apache.org/download.cgi, find the download for windows, the blogger directly downloads the latest version.
2. If you want to choose other versions, click "archives" to find the corresponding version and download it. Here we take 3.6.0 as an example.
Select binaries, the windows system selects the download with the suffix .zip and it is available.
The file looks like this after a successful download.
Two, Maven configuration
1. Right-click My Computer->Properties->Advanced System Settings->Environment Variables.
2. Configure two variables M2_HOME and MAVEN_HOME, M2_HOME will be used in subsequent development.
3. Add %M2_HOME%\bin and %MAVEN_HOME%\bin to Path, and click OK.
4. After configuration, click "OK", then click "Apply" and "OK", and the Maven configuration is complete.
3. Verification
1. Open win+R and enter cmd.
2. Enter mvn -v, after seeing the version number and related information, congratulations on completing the installation and environment configuration of maven! !
Four, Maven warehouse settings (setting.xml settings)
1. Find the conf folder in the maven installation directory.
2. Open the setting.xml file.
3. Create a new folder as a local warehouse, that is, the jar package downloaded by the project will be saved to the local warehouse. Set path in localRepository tag.
4. Set up the Alibaba Cloud central warehouse image. So far, the basic configuration of the maven part can basically meet the development needs.
<mirror>
<id>nexus-aliyun</id>
<name>nexus-aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
Summarize
1. There are also problems encountered during the environment configuration process. First, I will list a problem I have encountered: The JAVA_HOME environment variable is not defined correctly.
The detailed solutions have been listed in other articles. If you have other questions, please come to discuss them.