【问题标题】:Problem with connecting robovm-rt library连接robovm-rt库的问题
【发布时间】:2021-05-28 21:04:59
【问题描述】:

当我连接新库 robovm-rt 时,gradle 发誓我已经在另一个库中有几个这样的类:

Duplicate class org.apache.commons.logging.Log found in modules robovm-rt-2.3.5 (com.mobidevelop.robovm:robovm-rt:2.3.5) and spring-jcl-5.1.2.RELEASE (org.springframework:spring-jcl:5.1.2.RELEASE)
Duplicate class org.apache.commons.logging.LogFactory found in modules robovm-rt-2.3.5 (com.mobidevelop.robovm:robovm-rt:2.3.5) and spring-jcl-5.1.2.RELEASE (org.springframework:spring-jcl:5.1.2.RELEASE)
Duplicate class org.apache.commons.logging.LogFactory$1 found in modules robovm-rt-2.3.5 (com.mobidevelop.robovm:robovm-rt:2.3.5) and spring-jcl-5.1.2.RELEASE (org.springframework:spring-jcl:5.1.2.RELEASE)
Duplicate class org.apache.commons.logging.impl.NoOpLog found in modules robovm-rt-2.3.5 (com.mobidevelop.robovm:robovm-rt:2.3.5) and spring-jcl-5.1.2.RELEASE (org.springframework:spring-jcl:5.1.2.RELEASE)
Duplicate class org.apache.commons.logging.impl.SimpleLog found in modules robovm-rt-2.3.5 (com.mobidevelop.robovm:robovm-rt:2.3.5) and spring-jcl-5.1.2.RELEASE (org.springframework:spring-jcl:5.1.2.RELEASE)

我试图以不同的方式从库中排除这些 Apache 类,但它们都不起作用,问题仍然存在。不工作的选项:

选项 1:

implementation (group: 'com.mobidevelop.robovm', name: 'robovm-rt', version: '2.3.5') {
        exclude group: 'commons-logging', module: 'commons-logging'
    }

选项 2:

implementation (group: 'com.mobidevelop.robovm', name: 'robovm-rt', version: '2.3.5') {
        exclude group: 'org.apache.commons', module: 'commons-logging'
    }

排除这些类以免重复的正确方法是什么?

【问题讨论】:

    标签: spring gradle build robovm


    【解决方案1】:

    回答我的问题,我只是不从第一个库中排除模块,而是从第二个库中排除模块 - spring-boot-starter-websocket

    implementation('org.springframework.boot:spring-boot-starter-websocket') {
            exclude group: 'org.springframework', module: 'spring-jcl'
        }
    

    【讨论】:

      猜你喜欢
      • 2023-01-26
      • 1970-01-01
      • 2014-01-22
      • 2014-07-14
      • 1970-01-01
      • 2020-04-06
      • 1970-01-01
      相关资源
      最近更新 更多