title: How to Exclude directory and its contents in gradle war
body: <p>I am using <code>gradle</code> war plugin, I am trying to exclude some directories inside <code>WEB-INF</code> directory while packing a war, but the excludes don't seem to work.
  This is what I have</p>
  
  <pre><code> war {
     webInf {
          from 'src/main/config'
      }
     exclude('metadata/**')
    }
  </code></pre>
  
  <p>Any solution on this ?</p>