How to remove all packages except one in a WAR file?

(Nicolas Bihan) #1


I’m trying to remove a complete list of sub-packages except one in a war task.

Packages to remove from the war are

… and 20 more packages

I want to include in my war

So far I tried to exclude all and include only the one I want to keep but no success.

classpath = configurations.runtime
webInf {
  into('classes') {
   from sourceSets.main.output
              from sourceSets.main.output

I’m using Gradle 1.6

thanks, Nico