Maven打包排除不需要的文件。

pom.xml

<!-- package打包排除掉一些配置文件 -->
            <plugin>    
                <groupId>org.apache.maven.plugins</groupId>    
                <artifactId>maven-war-plugin</artifactId>    
                <version>2.0.2</version>    
                <configuration>    
                     <warSourceExcludes>src/main/resources/**</warSourceExcludes>    
                </configuration>    
            </plugin>    
            
<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>**/*.jpg</exclude>
          </excludes>
        </resource>
      </webResources>
    </configuration>
  </plugin>


<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <configuration> <excludes> <exclude>src/main/resources/*.sql</exclude> </excludes> </configuration> </plugin>

 

posted @ 2015-11-22 17:39  旋转的梦  阅读(2871)  评论(0编辑  收藏  举报