字号: 小 中 大 |
推荐给好友
上一篇 |
下一篇
使用 Ant 自动生成项目构建版本
发布: 2008-6-19 18:03 |
作者: 不详 |
来源:
测试时代编辑整理 |
查看: 177次 | 进入软件测试论坛讨论
领测软件测试网
导出可部署单元
在此步骤中,我们要对可部署单元进行打包,以准备好在下一步中进行部署。清单 8 显示了如何导出企业应用程序。
清单 8. 导出企业应用程序
<target name="exportear" description="Export an Enterprise Application">
<!-- Export EAR file-->
<earExport earprojectname="${project.name}"
earexportfile="${destination.dir}/${project.name}.ear"
exportsource="false" IncludeProjectMetaFiles="false"
overwrite="true" />
</target>
|
与步骤 3(构建代码)期间处理一组项目的方式类似,我们可以在导出企业应用程序时采用相同的方式。清单 9 中的代码说明了如何进行此工作。
清单 9. 导出企业应用程序
<target name="exportall" depends="buildall"
description="Export a set of Enterprise Applications">
<!-- Export an Enterprise Application -->
<antcall target="exportear">
<!-- Pass the name of the project to be exported -->
<param name="project.name" value="MyFirstEAR" />
</antcall>
<!-- Export another Enterprise Application -->
<antcall target="exportear">
<!-- The name of the other Enterprise Application -->
<param name="project.name" value="MySecondEAR" />
</antcall>
</target>
文章来源于领测软件测试网 https://www.ltesting.net/
|