In Maven, dependencies will be passed
A-->C B-->A ==>B-->C (this dependency is passed based on the scope of compile)
If no scope is written in the dependency configuration, the default is the compile scope. The transfer of dependencies is mainly for the scope of the compile scope
dependencies: the
test scope means that the test scope is valid, and this dependency is not used
during compilation and packaging. Stored in
the provided scope means that it is valid in the process of compilation and testing, and will not be added when the war package is finally generated, such as: servlet-api, because web servers such as servlet-api and tomcat already exist
. Depends at runtime, not at compile time
Dependency Conflicts
When dependencies conflict or you want to precisely control dependent packages, you can use the dependency exclusion function --> exclusions to exclude
Selection of different versions of the same package that depends on the project:
1. On the engineering tree, the shallower attempts of the dependency tree take precedence . The highest priority is selected for direct dependencies, and the lower the level of the tree, the higher priority is for indirect dependencies.
2. Dependent on the same level, the former is preferred.
In short, the principle of proximity. When versions conflict , exclusions can be used to specify the excluded versions.
See also: http://blog.csdn.net/bluishglc/article/details/6584678