【问题标题】:How to resolve dependency convergence error in jasperreports with commons-logging library?如何使用 commons-logging 库解决 jasperreports 中的依赖收敛错误?
【发布时间】:2021-02-10 20:28:31
【问题描述】:

环境:

  • JBoss7.2
  • Java 11

Maven 依赖:

...
<dependency>
   <groupId>net.sf.jasperreports</groupId>
   <artifactId>jasperreports</artifactId>
   <version>${jasperReport.version}</version>
   <exclusions>
       <exclusion>
           <groupId>org.olap4j</groupId>
           <artifactId>olap4j</artifactId>
       </exclusion>
       <exclusion>
           <groupId>xml-apis</groupId>
           <artifactId>xml-apis</artifactId>
       </exclusion>
       <exclusion>
           <groupId>stax</groupId>
           <artifactId>stax-api</artifactId>
       </exclusion>
       <exclusion>
           <groupId>com.lowagie</groupId>
           <artifactId>itext</artifactId>
       </exclusion>
   </exclusions>
</dependency>
...

Dependency convergence error for commons-logging:commons-logging:1.2 paths to dependency are:
+-es.caib.accfor:accfor-commons:8.0.0
  +-net.sf.jasperreports:jasperreports:6.5.1
    +-commons-beanutils:commons-beanutils:1.9.4.redhat-00002
      +-commons-logging:commons-logging:1.2
and
+-es.caib.accfor:accfor-commons:8.0.0
  +-net.sf.jasperreports:jasperreports:6.5.1
    +-commons-digester:commons-digester:2.1
      +-commons-logging:commons-logging:1.1.1
and
+-es.caib.accfor:accfor-commons:8.0.0
  +-net.sf.jasperreports:jasperreports:6.5.1
    +-commons-logging:commons-logging:1.1.1
and
+-es.caib.accfor:accfor-commons:8.0.0
  +-net.sf.jasperreports:jasperreports:6.5.1
    +-org.codehaus.castor:castor-xml:1.3.3
      +-org.codehaus.castor:castor-core:1.3.3
        +-commons-logging:commons-logging:1.1.1
and
+-es.caib.accfor:accfor-commons:8.0.0
  +-net.sf.jasperreports:jasperreports:6.5.1
    +-org.codehaus.castor:castor-xml:1.3.3
      +-commons-logging:commons-logging:1.1.1

[WARNING] Rule 3: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Failed while enforcing releasability. See above detailed error message.

【问题讨论】:

    标签: maven dependencies version convergence


    【解决方案1】:

    您需要选择其中一个版本,可能是1.2,然后在您的&lt;dependencyManagement&gt; 中添加一个条目。

    【讨论】:

      【解决方案2】:

      只排除其他依赖项,只排除其中一个依赖项。

      <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
      </exclusion>
      

      【讨论】:

        猜你喜欢
        • 2015-03-29
        • 1970-01-01
        • 2016-08-12
        • 2023-03-31
        • 2016-09-24
        • 2018-01-05
        • 2021-10-29
        • 2015-09-19
        • 1970-01-01
        相关资源
        最近更新 更多