1. Download the file
To use maven, you need to install the jdk environment, if you don’t have one, you can see my previous tutorial
Link: https://pan.baidu.com/s/1GiWXfcyNcdHKKC-CWbGCrw Extraction code: pri2
2. Unzip the compressed package
To any folder, it’s best to organize it into a dedicated file directory for easy searching
3. Set up the configuration file
Open the maven folder, apache-maven-3.6.1\conf
open settings.xml
Add <localRepository>H:/pacakges/jarstore</localRepository>
the folder path here is created by yourself, feel free to
insert
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/repository/central</url>
</mirror>
<mirror>
<id>aliyun-maven</id>
<mirrorOf>*</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
<mirrors>
4. Configure environment variables
Create new system variable MAVEN_HOME, variable value: maven folder path
Edit system variable Path, add variable value: ;%MAVEN_HOME%\bin
5. Test
6. Use idea to create a new maven project
Create a new projets and select maven to
set the package name and project name
. If there is no automatic location, you need to manually select the maven directory. The jarstore is created by yourself, change it to a suitable path
Add an attribute in the interface below, archetypeCatalog = internal
Finish,
wait for him to download
it and modify it to jdk version (I am 1.8) after the download is complete, and change it to 4.12 below