1. Why conflicts of dependence arise
The transitive dependency mechanism in Maven simplifies dependency declarations on the one hand and, on the other, may cause version conflicts if transitive dependencies occur. For example, there are dependencies such as: A->b->c->x (1.0), A->d->x (2.0), and the scenario for such a conflict maven is: The first principle: The path is the most recent priority, the second principle: the path length is equal to the premise, The order of the dependency declarations in the Pom determines who will be parsed.
2. How to exclude dependencies
Pom is as follows:
<dependency> ... <exclusions> <exclusion> ... </exclusion> </exclusions> </dependency>
3, the optimization relies on 3.1 related MVN command
MVN dependency:list
MVN Dependency:tree
MVN Dependency:analyze
3.2 Idea Optimization Support
Maven Dependency Jar Package version conflict solution