One: download maven
Maven official download URL: click me to download
Two: configuration in environment variables
First we need to configure JAVA_HOME (jdk directory: D:\java_jdk)
Next we configure MAVEN_HOME (maven directory: D:\apache-maven-3.6.3)
Next we need to configure MAVEN_HOME\bin to the path
Three, check the mvn installation
Enter the cmd command line, enter: mvn -version, the following code appears to indicate successful installation
Four, configure maven warehouse
Open our maven directory, find config in the maven directory, and find settings.xml in the config directory.
Take my maven as an example: D:\apache-maven-3.6.3\conf\settings.xml
and add a sentence to it : <LocalRepository> d:/mavenidea </ localRepository>
The jar packages downloaded by mvn are all in this.
Note that if there is already localRepository in the file, then we need to comment out the original