How to download and configure maven

  1. Enter maven official website http://maven.apache.org/
    Insert picture description here

  2. Click Download
    Insert picture description here

  3. Click the apache-maven-3.6.3-bin.zip link to download
    Insert picture description here

  4. My installation path here is: D:\maven\apache-maven-3.6.3-bin\apache-maven-3.6.3
    Insert picture description here

  5. Modify the settings.xml file in the conf directory
    Insert picture description here

  6. Modify the image inside and change it to a maven warehouse maintained by Alibaba Cloud. Its running speed is guaranteed in China!
    Insert picture description here

  7. Set the jar package storage location, I set it to the javaMvn folder of D drive here
    Insert picture description here

  8. Set system environment variables, add MAVEN_HOME variable, its path is the directory where maven is installed
    Insert picture description here

  9. Add maven's bin directory under the Path directory
    Insert picture description here

  10. window key + R input cmd to open a black window and input mvn -v, if the corresponding version number is output, the installation is successful
    Insert picture description here

  11. Next, open the Intellij IDEA environment, click the File menu in the upper left corner, and select the Settings option in the drop-down menu, as shown in the figure below
    Insert picture description here

  12. In the pop-up Settings interface, click "Build, Execution, Deployment", then click "Build Tools", select the "Maven" option, as shown below
    Insert picture description here

  13. Then click the Maven home directory setting button on the right, as shown in the figure below
    Insert picture description here

  14. Then in the pop-up Maven home directory selection interface, we locate the installation package just downloaded, as shown below
    Insert picture description here

  15. Next, click the settings button on the right side of the configuration file, as shown in the figure below, be careful not to use the configuration file that comes with the software
    Insert picture description here

  16. In the pop-up configuration file setting interface, we can select the settings.xml file under the maven installation package, as shown in the following figure

Insert picture description here
16. Finally back to the Intellij IDEA interface, we can see that the Maven environment has appeared on the right, and then everyone can use the commands under Maven to manage the project
Insert picture description here

Hope to be helpful to students who need to learn

Guess you like

Origin blog.csdn.net/hcz666/article/details/110308854