Maven installation and configuration, idea integrated maven

Maven installation and configuration, idea integrated maven

Before installing maven, make sure that jdk is installed and the environment is configured. For jdk installation tutorial reference: https://blog.csdn.net/weixin_45757641/article/details/127731501
maven compressed package:
link: https: //pan.baidu.com/s/1NUC4nwZ4MZaCGNiFEIoVHg?pwd=4uj5
Extraction code: 4uj5

1. Basic installation and environment configuration

1. Download the installation package and unzip it.
Note: After decompression, put the file into a directory, and the path of the directory should not contain Chinese characters or spaces.
2. Configure the maven environment.
Right-click on this computer—"Properties—"Find the advanced system settings (it is on the right if it is not below, it must be there anyway, look carefully)—"Environment variables and then find the
system variable path, and put it in the maven installation directory The path of the bin below is added to the path.
insert image description here
3. Test the installation of maven, open the black window, and execute the command mvn -v to see if the installation is successfulinsert image description here

2. Modify the location of the local warehouse

First create a directory and use it as a warehouse. There should be no Chinese and spaces in the directory, and the directory should not be too deep. For example: D:\maven\openrepository Modify the configuration file of the maven tool, modify the setting.xml file
in the maven installation path\conf\setting.xml , and specify the directory D:\maven\openrepository

<localRepository>D:\maven\openrepository</localRepositor>

insert image description here

3. Integration of maven and idea

Select File—"Settings, then search for maven, make settings,
insert image description here
insert image description here
and then click on the file, other settings, and configure the new project. The configuration
insert image description here
operation is the same as the two pictures above.
Then our configuration is over here, welcome to like, collect and comment! ! !

Guess you like

Origin blog.csdn.net/weixin_45757641/article/details/127734569