有的时候需要去除引用中的依赖
overlays项目打包排除引用war中多余的jar
排除war中的部分
<overlays>
<!-- 合并 war包 -->
<overlay>
<groupId>com.fsl</groupId>
<artifactId>lcp.extension</artifactId>
</overlay>
<overlay>
<groupId>com.fsl</groupId>
<artifactId>lcp.hotfix</artifactId>
</overlay>
<overlay>
<groupId>com.fsl</groupId>
<artifactId>lcp.wrapper</artifactId>
<!-- 声明排除war包中的部分 -->
<excludes>
<exclude>WEB-INF/lib/hap*</exclude>
</excludes>
</overlay>
</overlays>
maven 打包的时候排除多余的文件
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<attachClasses>true</attachClasses><!-- 把class打包jar作为附件 -->
<packagingExcludes>
WEB-INF/lib/hap*classes.jar
</packagingExcludes>
</configuration>
</plugin>
</plugins>