Question 1: <dependencies> and dependencyManagement in the parent class tag
If you use dependencies, the child pom will automatically use the jar package in the parent pom,
If you use dependencyManagement, the subclass will not automatically use the jar package in the parent class. If the subclass wants to use it, you must give the groupId and artifactId, without giving the version.
Using the former, if the parent class has a lot of dependencies, then the useless ones will also be inherited, which will cause bloat. The benevolent should see the benevolent. I personally like the former.
Question 2: After solving the first problem, still can't the subclass refer to the dependency in the parent class?
In the end, the problem I found was that the following tags were not added
The default value of this tag is ../pom.xml
Search order: address in relativePath element-local warehouse-remote warehouse
Setting a null value will always be obtained from the warehouse, not from the local path.