Idea created the maven project, but did not import the corresponding package when modifying the pom file, how to solve it?

as shown in the figure, the springboot dependency module I added has not been introduced at all. Even if I click to reintroduce it, it will not work. Other projects are normal. I just built this project. How to solve it?

clipboard.png

Mar.01,2021

found the reason: the original function of the dependencyManagement node in pom is to manage the version only, not to actually introduce jar!
so, of course, the introduction we added to the parent pom.xml will not be introduced, so when I add something such as:

to the pom.xml file of the child module
<dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    </dependencies>

was introduced immediately, alas, it was caused by unfamiliarity with maven!

reference: dependencyManagement meaning in Maven

Menu