2013-12-17 16 views
1
<plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-war-plugin</artifactId> 
       <version>2.4</version> 
       <configuration> 
        <webResources> 
         <resource> 
          <!-- this is relative to the pom.xml directory --> 
          <directory>src/main/webapp</directory> 
          <!-- there's no default value for this --> 
          <excludes> 
           <exclude>META-INF/context.xml</exclude> 
          </excludes> 
         </resource> 
        </webResources> 
       </configuration> 
      </plugin> 

我有文件的src/main/webapp的/ META-INF/context.xml的如何排除戰爭的context.xml在行家

我想從戰爭文件中排除它。我引用了官方文檔併爲pom添加了插件。但現在看來,下demo.war/META-INF/context.xml的

回答

3
<plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-war-plugin</artifactId> 
       <version>2.4</version> 
       <configuration> 
        <warSourceExcludes>META-INF/context.xml</warSourceExcludes> 
       </configuration> 
      </plugin> 

這個工程