maven插件-构建ear
2016-01-14 14:02
211 查看
完成例子:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion>
<groupId>STUDY_EAR</groupId>
<artifactId>STUDY_EAR</artifactId>
<packaging>ear</packaging>
<version>1.0-SNAPSHOT</version>
<description></description>
<dependencies>
<dependency>
<groupId>com.newegg.lab</groupId>
<artifactId>MemberWeb</artifactId>
<version>0.1-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>com.newegg.lab</groupId>
<artifactId>frontWeb</artifactId>
<version>0.1-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<finalName>study-ear</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<modules>
<webModule>
<groupId>com.newegg.lab</groupId>
<artifactId>MemberWeb</artifactId>
<contextRoot>
/MemberWeb
</contextRoot>
</webModule>
<webModule>
<groupId>com.newegg.lab</groupId>
<artifactId>frontWeb</artifactId>
<contextRoot>
/frontWeb
</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
</project>
一、新建项目
新建一个空的Maven Project项目 (选择 quick 就可以)二、放入pom.xml 内容如上
三、运行
1> 先运行: mvn ear: generate-application-xml 生成 application.xml文件
2> 再运行:mvn ear:ear
四、ear包打好
相关文章推荐
- 文件服务器-FastDfs-安装-配置
- hi3518e-uboot-env记录
- 图像保存到指定路径,CString转char*
- C# String与string的区别
- KiFastCallEntry() 机制分析
- Unix
- 笔记本安装固态硬盘ssd教程
- 利用shell脚本来监控linux系统的负载与CPU占用情况
- HDU5158Have meal
- MTK-OPENWRT加4G驱动
- CSS技巧
- Ext学习系列(8)-- Ext.data.JsonReader
- php双引号中访问数组元素报错
- [从头学数学] 第44节 长方形和正方形
- 使用Shell脚本对Linux系统和进程资源进行监控
- Android HandlerThread 的使用及其Demo
- ISO7816中的ATR简介
- CImageList列表显示位图缩略图
- CentOS 6.4下PXE+Kickstart无人值守安装操作系统
- 浅谈windows句柄表