idea configuration maven warehouse

1. Go to the development document server of Dane to download the corresponding plug-in

Dane Development Documentation Server

Find the configuration file to download, and download the Alibaba Cloud Maven creation library configuration

The above download compressed package does not move

2. Create a maven project

open idea

file-----new project

Click on the left to select maven and then next

 

3. Then check the corresponding maven path

Click on file---setting

The possible path of each person may be different, but it must start with the C drive (except Apple)

4. Configure maven

Unzip the Alibaba Cloud Maven library configuration you downloaded (there is a settings.xml file inside)

Find the default maven path on the computer (note that the path temporarily ignores the settings.xml file inside, just look at the path)

 

If there is no .m2 under the path, create one by yourself. Be careful to match the value of the path displayed in your own idea.

The above means that the maven configuration is successful

5. Detection path pairs

Find maven in idea (refer to how to view maven path)

 

6. Test that maven can be used

Open the maven project and find pom.xml

 

 
 
<dependencies>
    <!-- 连接MySQL数据库的依赖 -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>8.0.15</version>
    </dependency>
</dependencies>

Check the following after clicking the icon

If you don’t succeed, try a few more times to see which one is different. Bring the problem to the teacher.

(Maven will talk about configuring it yourself in the early stage later)

Guess you like

Origin blog.csdn.net/weixin_47852232/article/details/126723256