The solution to the lack of dependencies in the Maven project

I just started to learn the framework recently, and every time I configure it in the pom.xml file, the corresponding file will not appear in the "External Libraries" on the left. Having been troubled by this problem for several days, I finally found a solution, which is also very simple.

problem

After creating the Maven project in IDEA, configure the pom.xml file
Insert picture description here
and then look at the project list on the left
Insert picture description here
. It should be normal, but mine only has jdk, and the following files do not exist

Solution 1

Right click "Project Name" —> Maven —> Reload project
Insert picture description here

Solution 2

Insert picture description here


If it still doesn't work

It may be that the domestic mirror is not set when configuring Maven (here, choose to set as the mirror of Alibaba Cloud).
As mentioned in this article, you can refer to: Maven configuration
or just look at the following part.
Insert picture description here
Insert picture description here

<mirrors>
	<mirror>
			<id>nexus-aliyun</id>
			<mirrorOf>*</mirrorOf>
			<name>Nexus aliyun</name>
			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
	</mirror>
</mirrors>

Guess you like

Origin blog.csdn.net/pary__for/article/details/111936477