IDEA import maven project

1. Open IDEA, click the second option "Import Porject", then select the source code root directory, and then click "ok", as shown in the figure:

2. Import the existing model and select the pom.xml file in the root directory of the maven project according to the prompt.

3. Click the "OK" button, the following configuration page will pop up, the default configuration is directly Next:

IDEA recognizes the maven project.

4. Add JDK.

5. Fill in the project name

6. After clicking Finished, IDEA will open another window to display. At this time, IDEA will automatically find dependencies, download jar packages, etc. The length of this process depends on the network and the central warehouse configured by maven. After success, the following project directory structure appears . If you end up on the left, and you still don't see the project directory structure, there is a problem with the import. Click the menu File->Close Project, close the project, and then execute the import again.

7. Click the "Maven Project" button in the upper right corner to open the maven view.

8. Open the "Terminal" at the bottom and execute the mvn clean command.

Guess you like

Origin blog.csdn.net/m0_54883970/article/details/124264151