Maven build多个war包合并

来源:互联网 发布:ipad能用mac系统 编辑:程序博客网 时间:2024/05/13 03:34
<!-- 添加要合并的war包依赖 -->
<dependency>
<groupId>com.jeeplus</groupId>
<artifactId>jeeplus-cert-web</artifactId>
<version>1.0.0</version>
<type>war</type>
</dependency>


 <build>
    <plugins>
    <!-- 打包插件 -->
      <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.1.1</version>
    <configuration>
    <!-- 多个war包合并,合并规则:前面的总是覆盖后面(需要添加合并的war包依赖且type:war)- -->
    <overlays>
    <overlay>
        <groupId>com.jeeplus</groupId>
              <artifactId>jeeplus-cert-web</artifactId>
            <excludes>
              <exclude>WEB-INF/web.xml</exclude> <!--不包含-->
              </excludes>
    </overlay>
    <overlay></overlay> <!--空表示当前构建-->
    </overlays> 

    </configuration>

</plugin>

</build>


原创粉丝点击