# War plugin not including src/main/webapp

**URL:** <https://discuss.gradle.org/t/war-plugin-not-including-src-main-webapp/3537>\
**Category:** Old Forum Archive\
**Created:** [April 22, 2013, 10:03am UTC](https://discuss.gradle.org/t/war-plugin-not-including-src-main-webapp/3537 "2013-04-22T10:03:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveb](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@steveb](https://discuss.gradle.org/u/steveb)\
**Post date:** [April 22, 2013, 10:03am UTC](https://discuss.gradle.org/t/war-plugin-not-including-src-main-webapp/3537/1 "2013-04-22T10:03:00Z")

</div>

Does anyone know if it is possible to configure the standard war task such that excludes all default files and only uses directories that I directly specify ?

I have the ‘original’ source code (html, js files etc) under src/main/webapp but run everything through optimizers via require.js such that the new root is under ‘build/main’

If I just specify it like this I also have the original files from src/main/webapp included

```gradle
war {
       from 'build/main'
}

```

Is there a way to exclude the default webapp root ?

---

<div class="post-metadata">

**Author:** ![steveb](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@steveb](https://discuss.gradle.org/u/steveb)\
**Post date:** [April 22, 2013, 10:57am UTC](https://discuss.gradle.org/t/war-plugin-not-including-src-main-webapp/3537/2 "2013-04-22T10:57:00Z")

</div>

The workaround so far is to specify a non-existent webAppDir like this ` webAppDirName = ‘notused’ `
