maven如何合并两个war到一个war项目中
来源:互联网 发布:微信美工工资一般多少 编辑:程序博客网 时间:2024/05/18 20:52
1.首先配置依赖:
dependency> <groupId>org.jeecgframework</groupId> <artifactId>jeewx-test-web</artifactId> <version>1.0.0-SNAPSHOT</version> <type>war</type> <scope>runtime</scope> </dependency>
这里type一定要指定war.
然后在build节点内指定plugin如下:
<!-- 合并多个war --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <packagingExcludes>WEB-INF/web.xml</packagingExcludes><overlays> <overlay> <groupId>org.jeecgframework</groupId> <artifactId>jeewx-test-web</artifactId> </overlay></overlays> </configuration></plugin>
其他参考:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <overlays> <overlay> <groupId>com.chinarb.new</groupId> <artifactId>RBManagerNew-SettleAccountsModel</artifactId> <excludes> <!-- 那些文件可以忽略不,整合的时候不会将SettleAccountsModel文件整合进war中 --> <exclude>**/web.xml</exclude> <exclude>**/config/</exclude> <exclude>**/lib/</exclude> <exclude>**/com/chinarb/entity/</exclude> </excludes> </overlay> <overlay..><!-- 其他的war项目 --> </overlays> </configuration> </plugin> </plugins> </build>
如果war中有的文件是不会覆盖掉,所以如果war中文件相同.overlay节点之后的内容是无法覆盖之前的.
使用这个技术可以完成 war单独运行,也可打包运行
采用eclipse启动命令: tomcat:run-war
0 0
- maven如何合并两个war到一个war项目中
- maven如何合并两个war到一个war项目中
- maven如何合并两个war到一个war项目中
- 手把手教你一个maven的war项目如何引用另外一个war项目
- maven 多web项目合并war
- maven项目如何生成war文件并部署到tomcat
- IDEA中创建war类型的maven项目中有一个src目录而Eclipse创建的war类型的项目有两个src
- maven合并war包
- maven合并war包
- Maven 两个项目间的war依赖
- Maven中如何配置WAR依赖WAR和JAR的多模块项目结构
- Maven中如何配置WAR依赖WAR和JAR的多模块项目结构
- Maven中如何配置WAR依赖WAR包
- Maven中如何配置WAR依赖WAR包
- Maven中如何配置WAR依赖WAR包
- Maven中如何配置WAR依赖WAR包
- maven项目如何生成war文件
- maven项目如何生成war文件
- SDWebImageDemo
- android 文字滚动动画
- Android最佳的开源库集锦
- 50 Android Studio Tips, Tricks & Resources you should be familiar with, as an Android Developer
- MonkeyRunner简介
- maven如何合并两个war到一个war项目中
- jvm参数选项要求
- 电商类APP H5与iOS和android混合开发问题记录
- Codeforces Round #378 (Div. 2) A. Grasshopper And the String(水题求跳跃距离)
- GiftCard
- JSP中<base href="<%=basePath%>">作用
- Python学习第二篇
- MSHR(Miss Status and Handling Register)
- Android 轻量级万能适配器,通吃所有的 AbsListView、RecyclerView