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

前端之家收集整理的这篇文章主要介绍了Maven打包排除不需要的文件。前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

pom.xml

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


>maven-jar-plugin>2.4> excludes> exclude>src/main/resources/*.sql> > >

 

猜你在找的Maven相关文章