title: Using war excludes in the pom.xml
body: <p>The maven documentation for this has to be wrong. </p>
  
  <p>Here are the various permutations I have tried with all failing to exclude the file:</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;configuration&gt;
        &lt;warSourceExcludes&gt;**/*server.properties&lt;/warSourceExcludes&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
  
    &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
        &lt;webResources&gt;
          &lt;resource&gt;
            &lt;!-- this is relative to the pom.xml directory --&gt;
            &lt;directory&gt;src/main/resources/com/mycom/myapplication/&lt;/directory&gt;
            &lt;!-- there's no default value for this --&gt;
            &lt;excludes&gt;
              &lt;exclude&gt;**/*server.properties&lt;/exclude&gt;
            &lt;/excludes&gt;
          &lt;/resource&gt;
        &lt;/webResources&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
  </code></pre>
  
  <p>A mail list entry suggests using this older version and a string list:</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.0.1&lt;/version&gt;
      &lt;configuration&gt;
        &lt;webResources&gt;
          &lt;resource&gt;
            &lt;!-- this is relative to the pom.xml directory --&gt;
            &lt;directory&gt;src/main/resources/com/pictage/provendirect/&lt;/directory&gt;
            &lt;!-- there's no default value for this --&gt;
            &lt;excludes&gt;**/*server.properties&lt;/excludes&gt;
          &lt;/resource&gt;
        &lt;/webResources&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
  </code></pre>
  
  <p>Which results in:</p>
  
  <p>(found static expression: '<strong>/*server.properties' which may act as a default value).
  Cause: Cannot assign configuration entry 'excludes' to 'interface java.util.List' from '</strong>/*server.properties', which is of type class java.lang.String</p>
  
  <p>Also tried:</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.0.1&lt;/version&gt;
      &lt;configuration&gt;
        &lt;packagingExcludes&gt;
          **/server.properties
        &lt;/packagingExcludes&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
  </code></pre>
  
  <p>Any ideas?  I am going crazy with this.  </p>