https://blog.csdn.net/zhanhong39/article/details/47749023
查看依赖书关系的三中国方式:
1、命令: mvn dependency:tree(推荐)
2、生成对应依赖树图 ctrl+shift+alt+u
3、maven help
一、重复类
解决方法:(删除其中一个包,现在流行的Java日志框架用SLF4J,所以保留这个包)
1、在IntelliJ IDEA的pom文件用“ctrl+shift+alt+U”快捷键输出pom依赖框架,找到commons-logging:commons-logging的引用,这个工程项目是spring-context在引用
2、用方法
org.springframework spring-context commons-logging commons-logging二、版本号冲突
[WARNING] Rule 9: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Failed while enforcing releasability the error(s) are [
Dependency convergence error for xxx.tc:common-zookeeper:1.1.2 paths to dependency are:
+-com.xxx.flight.inter:inter_public_data.cache:1.1.4
+-xxx.tc:qmq-client:2.0.5
+-xxx.tc:common-zookeeper:1.1.2
and
+-com.xxx.flight.inter:inter_public_data.cache:1.1.4
+-xxx.tc:qmq-client:2.0.5
+-xxx.tc.qtracer:qtracer-instrument-http:1.0.7
+-xxx.tc.qtracer:qtracer-client:1.0.7
+-xxx.tc:common-zookeeper:1.1.0
]
解决方法:
用,选择高版本
<dependencies>
<dependency>
<groupId>xxx.tc</groupId>
<artifactId>common-zookeeper</artifactId>
<version>1.1.2</version>
</dependency>
</dependencies>
</dependencyManagement>