title: Maven - don't include a certain subdirectory of src/main/webapp in the final WAR
body: <p>(<strong>maven 2.2.1</strong>)</p>
  
  <p>Hello,
  I have this dir tree:</p>
  
  <pre><code>.
  ├── pom.xml
  ├── src
  │   ├── main
  │   │   └── webapp
  │   │       ├── META-INF
  │   │       ├── **resources**
  │   │       │   ├── **bootstrap**
  │   │       │   │   ├── **bootstrap**
  │   │       │   │   │   ├── css
  │   │       │   │   │   ├── img
  │   │       │   │   │   └── js
  │   │       │   │   ├── docs
  │   │       │   │   ├── img
  │   │       │   │   ├── js
  │   │       │   │   ├── less
  │   │       │   │   ├── LICENSE
  │   │       │   │   ├── Makefile
  │   │       │   │   ├── package.json
  │   │       │   │   └── README.md
  │   │       │   ├── cms
  │   │       │   └── **static**
  │   │       │       ├── css
  │   │       │       ├── feeds
  │   │       │       ├── img
  │   │       │       ├── js
  │   │       │       └── less
  │   │       ├── WEB-INF
  </code></pre>
  
  <p>Where I highlighted with double * the interesting directories...</p>
  
  <p>At package time, I'm trying both to exclude <code>resources/bootstrap</code> from the final WAR <strong>and</strong> copy <code>resources/bootstrap/boostrap</code> inside <code>resources/static</code>.</p>
  
  <p>In other words, I need to obtain the following:</p>
  
  <pre><code>.
  │   │       ├── META-INF
  │   │       ├── **resources**
  │   │       │   ├── cms
  │   │       │   └── **static**
  │   │       │       ├── **bootstrap**
  │   │       │       │   ├── css
  │   │       │       │   ├── img
  │   │       │       │   └── js
  │   │       │       ├── css
  │   │       │       ├── feeds
  │   │       │       ├── img
  │   │       │       ├── js
  │   │       │       └── less
  │   │       ├── WEB-INF
  </code></pre>
  
  <p>I'm unluckily messing around with the <code>maven-war-plugin</code> but still I'm unable to obtain the desired result.</p>
  
  <p>Here's the latest version of the relevant part of my pom:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.2&lt;/version&gt;
      &lt;configuration&gt;
          &lt;packagingExcludes&gt;WEB-INF/**.tld&lt;/packagingExcludes&gt;
          &lt;warSourceExcludes&gt;resources/bootstrap&lt;/warSourceExcludes&gt;
          &lt;webResources&gt;
              &lt;resource&gt;
                  &lt;!-- this is relative to the pom.xml directory --&gt;
                  &lt;directory&gt;src/main/webapp/resources/bootstrap&lt;/directory&gt;
                  &lt;!-- override the destination directory for this resource --&gt;
                  &lt;targetPath&gt;resources/static&lt;/targetPath&gt;
                  &lt;includes&gt;
                      &lt;include&gt;bootstrap/**&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/resource&gt;
          &lt;/webResources&gt;                 
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Thank you in advance for any hints of follow-ups!</p>