maven scope import
1 | <dependencyManagement> |
我们看到,这里多了一个<scope>
import</scope>
,它的意思是将spring-boot-dependencies 中dependencyManagement的dependencies,全部引入到当前工程的dependencyManagement中。根据maven官方文档Dependency Scope http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
- import
This scope is only supported on a dependency of typepom
in the<dependencyManagement>
section. It indicates the dependency is to be replaced with the effective list of dependencies in the specified POM's<dependencyManagement>
section. Since they are replaced, dependencies with a scope ofimport
do not actually participate in limiting the transitivity of a dependency.
参考:https://blog.csdn.net/wangjun5159/article/details/104298131
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html