解决pom文件依赖冲突、版本错误的问题

一、重复类

解决pom文件依赖冲突、版本错误的问题_第1张图片

解决方法:(删除其中一个包,现在流行的Java日志框架用SLF4J,所以保留这个包)

1、在IntelliJ IDEA的pom文件用“ctrl+shift+alt+U”快捷键输出pom依赖框架,找到commons-logging:commons-logging的引用,这个工程项目是spring-context在引用

解决pom文件依赖冲突、版本错误的问题_第2张图片

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
]
 
  解决方法: 
  

,选择高版本

[html]  view plain  copy
  1. <dependencyManagement>  
  2. <dependencies>  
  3. <dependency>  
  4. <groupId>xxx.tcgroupId>  
  5. <artifactId>common-zookeeperartifactId>  
  6. <version>1.1.2version>  
  7. dependency>  
  8. dependencies>  
  9. dependencyManagement>  

你可能感兴趣的:(Maven)