1. Installation-free environment variable configuration
1. Find your installation directory
2. System environment variable configuration
New: MAVEN_HOME
Add the value in Path: %MAVEN_HOME%\bin
Then all the way to determine, enter cmd
Enter: mvn -version to see if the Maven environment variable is configured successfully
At this point, the maven environment variables are configured
2. Create a new Maven local repository
Find a location you like on the local disk and create a new folder as maven's local repository. My folder name is localRepository
Copy this absolute path: G:\JetBrains\apache-maven-3.3.9\localRepository to use in the configuration file
3. Modify the configuration file
Copy the setting.xml file in the conf directory, put it in the location you like, modify some of the configuration content, it doesn't matter where you put it, the key is to specify your modified configuration when you introduce maven into the IDE tool you use ( I like to make changes directly on the original file, so I don't move)
Modify the file below:
01: point to the local warehouse
02: Configure the image of Alibaba Cloud (it can also be used if it is not worthy, but the speed of downloading dependencies is a bit slower than your imagination)
The added code is as follows:
<mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> </mirror>