Exclusion of files doesn't work as documented
---------------------------------------------

                 Key: MWAR-250
                 URL: http://jira.codehaus.org/browse/MWAR-250
             Project: Maven 2.x WAR Plugin
          Issue Type: Bug
    Affects Versions: 2.1.1
         Environment: maven-war-plugin 2.1.1, Maven 2.2.1, Java 1.6.0_18, 
Windows XP
            Reporter: Dirk Laube


I tried to exclude files and in accordance with the doc on 
http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html

I used the following maven-war-configuration, yet it didn't work for me, the 
exclude definition is ignored:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.1.1</version>
  <configuration>
    <webResources>
      <resource>
        <directory>src/main/webapp/</directory>
        <excludes>
           <exclude>**/*.wsil</exclude>  
           <exclude>WEB-INF/web.xml</exclude>  
         </excludes> 
      </resource>
    </webResources> 
  </configuration>
</plugin>

This configuration didn't work either:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.1.1</version>
  <configuration>
    <warSourceExcludes>**/*.wsil, WEB-INF/web.xml</warSourceExcludes> 
  </configuration>
</plugin>

Finally, with this configuration the specified files were excluded:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.1.1</version>
  <configuration>
    <excludes>**/*.wsil, WEB-INF/web.xml</excludes>
  </configuration>
</plugin>

That is, IMHO probably this is a bug, at least the documentation isn't in sync 
with the plugin behaviour.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to