Gradle 如何交换模块cxf rt传输http

Gradle 如何交换模块cxf rt传输http,gradle,build.gradle,Gradle,Build.gradle,我在build.gradle中有以下依赖项: compile ('org.apache.cxf:cxf-bundle:2.4.2') { exclude module: 'log4j-over-slf4j' } 我还想排除包含transports http的模块,因为库之间存在冲突(使用HttpConductor)。我试图排除它,但我认为我没有正确的模块名称。依赖项任务将为您提供一个依赖项报告,您可以在其中查看正在引入哪些可传递依赖项 ./gradlew depe

我在build.gradle中有以下依赖项:

compile ('org.apache.cxf:cxf-bundle:2.4.2')  {

        exclude module: 'log4j-over-slf4j'

    }

我还想排除包含transports http的模块,因为库之间存在冲突(使用HttpConductor)。我试图排除它,但我认为我没有正确的模块名称。依赖项任务将为您提供一个依赖项报告,您可以在其中查看正在引入哪些可传递依赖项

./gradlew dependencies --configuration compileClasspath
如果要检查该任务的输出,您将看到
org.apache.cxf:cxf bundle
似乎没有引入
cxf rt transports http
。因此,您需要检查您的项目,以找出重复依赖项的位置

Gradle还提供了一种处理版本冲突的方法: