MAVEN:两个war项目合并
假设存在war项目A、B.
想把A合并到B中,
只需要在B的pom.xml中添加以下配置
- 要合并的war项目,在主war项目中添加依赖
<dependency>
<artifactId>xxx</artifactId>
<groupId>yy</groupId>
<version>0.0.1-SNAPSHOT</version>
<type>war</type>
</dependency>
2.使用overlays合并
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<overlays>
<overlay>
<groupId>对应war工程的groupId</groupId>
<artifactId>对应war工程的artifactId</artifactId>
</overlay>
</overlays>
</configuration>
</plugin>