How do I extract an external WAR dependency into a web project?

Just tried with a simple zip task like this first:

configurations {
  caswebapp
}
  dependencies {
  caswebapp('org.jasig.cas:cas-server-webapp:3.4.10:war') {
    transitive = false
  }
}
  task makeZip(type: Zip) {
  from configurations.caswebapp
}

This does not create anything, as it seems WARs are filtered out from the configuration. As you might have guessed, I’m trying to create an “overlayed” WAR.

The solution is quite simple: just delete 4 characters (’:war’):

dependencies {
  caswebapp('org.jasig.cas:cas-server-webapp:3.4.10') {
    transitive = false
  }
}