In your case (servlet-api) you should make use of the configurations
providedCompile and providedRuntime of the War-Plugin. Then you should be
able to do something like that:
dependencies {
providedCompile "javax.servlet:servlet-api:2.5"
...
}
createTask('copy-to') {
(dependencies.resolve("runtime") -
dependencies.resolve("providedCompile")).each {
file -> FileUtils.copyFileToDirectory(file, 'foo/bar')
}
}
--
View this message in context:
http://www.nabble.com/Exclude-JAR-from-a-configuration-tp20861146p20910078.html
Sent from the gradle-user mailing list archive at Nabble.com.