Thank you all for the tips.

I have finally used the suggestion made by mvlcek since it is better suited
for my use case.


Regards,

Rafa



mvlcek wrote:
> 
> 
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-tp20861146p20936408.html
Sent from the gradle-user mailing list archive at Nabble.com.

Reply via email to