Custom gradle task extending the 'War' task does not see some required classes


This is related to the problem I posted at:

I’ve created a simple isolated sample (a 4K zip file, if someone wants to get it directly), but I did create these on gist:


Just tried with Gradle 1.6 as well - no change.

#3 available from:


Note that this problem is more general in nature and perhaps not limited to this particular task class - the question really is what truly is the classpath of custom tasks and how to control it? How to add references to libs coming from/with Gradle itself?

As for what the true intent of the original implementation of the task is - it is to create an enhanced WAR file that for each relevant static content (name).(ext) file inside it creates a separate (name).(ext).gz entry if that is deemed beneficial. See:

In my case I can’t use a war plugin either because a single war is created from multiple projects.