Maven build tool download and configuration (graphic details)

1. Download and install

1. Find the official website

 2. Download

 3. Unzip the file to the desired directory


2. System configuration

Configure the local repository localRepository

1. Configure the local warehouse location xml

 In order to facilitate management, create mvn_rep in the apache-maven-3.9.4 directory

2. Find the ocalRepository tag

3. Set the local warehouse path

 Configure a private server (because the download of the jar package from the central warehouse is too slow, you can choose a domestic mirror)

1. In the settings just now, find the label mirrors

2. Replace mirror with Alibaba Cloud's private server address

<mirror>  
	<id>alimaven</id>  
	<name>aliyun maven</name>  
	<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
	<mirrorOf>central</mirrorOf>          
</mirror>

 Configure environment variables

1. Open Advanced System Settings

2. Create a new system variable

 3. Set environment variables

In this way, the configuration is completed, and the next step is to test. First, open cmd and enter the command. If the version information is returned normally, it will be successful.

mvn -v

The next step is to start maven through idea


 3. Configure the maven project project

1. Start idea and click Settings

 2. Find the build tool, select the path, and the general system will automatically recognize the path

 3. Configure maven project

 4. Set up the compiler

At this point, the project configuration of maven is over


4. Create a new project

1. Create a new module in the file (Module)

 2. Select the module project

 3. Define the name, location, expand the coordinates of the workpiece, and enter the GroupId, which is generally reversed by the company domain name

 

 Even if the project is created


Next, we will explain in detail how to use maven

Learn more about Maven_Alphamilk's Blog - CSDN Blog

Guess you like

Origin blog.csdn.net/dogxixi/article/details/132345092