Gradle: Override transitive dependency by version classifier

后端 未结 6 1382
囚心锁ツ
囚心锁ツ 2020-12-28 12:42

One of the dependencies declared in my project has a transitive dependency on \'com.google.guava:guava:15.0\'. But my application deployed on WAS/Weblogic doesn

6条回答
  •  余生分开走
    2020-12-28 13:34

    Currently classifiers are not yet taken into account when it comes to resolutionStrategies. A workaround for you might excluding the transitive Guava library when declaring your dependencies and adding the Guava cdi1.0 version explicitly:

    dependencies {
        compile ("org.acme:someDependency:1.0"){
            exclude group: 'com.google.guava', module: 'guava'
        }       
        compile "com.google.guava:guava:15.0:cdi1.0"
    }
    

提交回复
热议问题