How to exclude certain WEB-INF/classes from war?

(Hristo Stoyanov) #1

Hi all,
I bumped into the same issue described here:

I am trying to exclude some '**/WEB-INF/classes/com/xxxxxx/web/client/' files from my war bundle as shown below - and none of the tips out there worked as described in the above stackoverflow question. Any clue?

war {
    duplicatesStrategy 'exclude'
    classpath configurations.warLib
    classpath = classpath.filter{ file -> 
        (      !'javaee-api')
            && !'javax')
            && !'junit')
            && !'hamcrest')
            && !'gwt-slf4j')