ProvidedCompile of War-Plugin

Two years ago someone described in the forum an issue with providedCompile (see http://forums.gradle.org/gradle/topics/providedcompile_incorrectly_excludes_transitive_dependencies_from_a_war_that_are_also_compile_dependencies_of_a_project)

I tested the described issue with gradle version 1.12 and still got the same results. So the problem still seems to be unsolved!

I regard this as a serious issue. Thanks for any comments on this.

It is still happening with gradle 2.2.1.

You can get around this by simply excluding those dependencies from the ‘providedCompile’ configuration. For example, in the example in the link above one could do this:

dependencies {

providedCompile(‘org.apache.shiro:shiro-core:1.1.0’) {

exclude group: ‘org.slf4j’, module: ‘slf4j-api’

}

compile ‘org.slf4j:slf4j-api:1.6.1’

// A transitive dependency of shiro-core as well

compile ‘ch.qos.logback:logback-core:0.9.24’

// Not a transitive dependency of shiro-core

}