ant 编译 build.xml

[quote]<?xml version="1.0" encoding="UTF-8"?>
<project name="crm_ANT" default="Main Build" basedir=".">
<property name="project.src" location="." />

<!-- 定义所有构建模块路径-->
<property name="crm.bloc" location="com.cdb.crm.bloc" />
<property name="crm.bpm" location="com.cdb.crm.bpm" />
<property name="crm.branchbiz" location="com.cdb.crm.branchbiz" />
<property name="crm.crmcommon" location="com.cdb.crm.crmcommon" />
<property name="crm.cust" location="com.cdb.crm.cust" />

<property name="crm.custmng" location="com.cdb.crm.custmng" />
<property name="crm.custrelation" location="com.cdb.crm.custrelation" />
<property name="crm.custservice" location="com.cdb.crm.custservice" />
<property name="crm.custvalue" location="com.cdb.crm.custvalue" />
<property name="crm.event" location="com.cdb.crm.event" />

<property name="crm.perform" location="com.cdb.crm.perform" />
<property name="crm.portal" location="com.cdb.crm.portal" />
<property name="crm.product" location="com.cdb.crm.product" />
<property name="crm.sale" location="com.cdb.crm.sale" />
<property name="crm.statis" location="com.cdb.crm.statis" />

<property name="crm.support" location="com.cdb.crm.support" />
<property name="crm.tempfolder" location="com.cdb.crm.tempfolder" />
<property name="crm.workmng" location="com.cdb.crm.workmng" />
<property name="uaap.auth" location="com.cdb.use.uaap.auth" />
<property name="uaap.integration" location="com.cdb.use.uaap.integration" />

<property name="uaap.org" location="com.cdb.use.uaap.org" />
<property name="uaap.rights" location="com.cdb.use.uaap.rights" />
<property name="uaap.tools" location="com.cdb.use.uaap.tools" />
<property name="use.util" location="com.cdb.use.util" />

<!-- Classpath -->
<property name="webcontent.dir" value="eos-web" />
<property name="webcontentlib.dir" value="${webcontent.dir}/WEB-INF/lib" />
<path id="master-classpath">
<fileset dir="${webcontentlib.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement path="." />
</path>

<!--编译入口-->
<target name="Main Build" depends="compiler">
<echo message="编译完成!" />
</target>

<target name="compiler">
<ant antfile="build.xml" target="del_src_class" />
<ant antfile="build.xml" target="compile_java" />

<ant antfile="build.xml" target="copy_crm_bloc" />
<ant antfile="build.xml" target="copy_crm_bpm" />
<ant antfile="build.xml" target="copy_crm_branchbiz" />
<ant antfile="build.xml" target="copy_crm_crmcommon" />
<ant antfile="build.xml" target="copy_crm_cust" />

<ant antfile="build.xml" target="copy_crm_custmng" />
<ant antfile="build.xml" target="copy_crm_custrelation" />
<ant antfile="build.xml" target="copy_crm_custservice" />
<ant antfile="build.xml" target="copy_crm_custvalue" />
<ant antfile="build.xml" target="copy_crm_event" />

<ant antfile="build.xml" target="copy_crm_perform" />
<ant antfile="build.xml" target="copy_crm_portal" />
<ant antfile="build.xml" target="copy_crm_product" />
<ant antfile="build.xml" target="copy_crm_sale" />
<ant antfile="build.xml" target="copy_crm_statis" />

<ant antfile="build.xml" target="copy_crm_support" />
<ant antfile="build.xml" target="copy_crm_tempfolder" />
<ant antfile="build.xml" target="copy_crm_workmng" />
<ant antfile="build.xml" target="copy_uaap_auth" />
<ant antfile="build.xml" target="copy_uaap_integration" />

<ant antfile="build.xml" target="copy_uaap_org" />
<ant antfile="build.xml" target="copy_uaap_rights" />
<ant antfile="build.xml" target="copy_uaap_tools" />
<ant antfile="build.xml" target="copy_use_util" />

</target>

<target name="del_src_class">
<echo message="删除所有模块下src目录中的class文件......" />
<delete includeEmptyDirs="true" failοnerrοr="false" verbose="true">
<fileset dir="." includes="com.cdb*/src/**/*.class" />
</delete>
</target>

<target name="compile_java">
<echo message="开始编译所有模块下的java文件......" />
<javac debug="on" srcdir="${project.src}" encoding="gbk">
<include name="com.cdb**/**/**.java" />
<classpath refid="master-classpath" />
</javac>
<echo message="编译java文件结束......" />
</target>

<target name="del_module_bin">
<echo message="删除${module.name}目录下的bin目录..." />
<delete includeEmptyDirs="true" dir="${module.bin}" failοnerrοr="false" verbose="true">
</delete>
</target>

<target name="copy_module_file">
<echo message="正在拷贝文件到${module.bin}中..." />
<copy toDir="${module.bin}" overwrite="true">
<fileset dir="${module.src}">
<include name="**/*" />
<exclude name="**/*.java" />
<exclude name="**/CVS/**" />
<exclude name="**/*.flowx" />
<exclude name="**/*.bizx" />
</fileset>
</copy>
</target>

<target name="copy_bizx">
<echo message="正在拷贝bizx文件到${module.bin}中..." />
<copy toDir="${module.bin}" overwrite="true">
<fileset dir="${module.src}">
</fileset>
<mapper type="glob" from="*.bizx" to="*.biz" />
</copy>
</target>

<target name="copy_flowx">
<echo message="正在拷贝flowx文件到${module.bin}中..." />
<copy toDir="${module.bin}" overwrite="true">
<fileset dir="${module.src}">
</fileset>
<mapper type="glob" from="*.flowx" to="*.flow" />
</copy>
</target>


<target name="print_copy_message">
<echo message="准备执行拷贝文件到${module.name}/bin中..." />
</target>

<target name="copy_all_action">
<property name="module.src" value="${module.name}/src" />
<property name="module.bin" value="${module.name}/bin" />

<antcall target="print_copy_message" />
<antcall target="del_module_bin" />
<antcall target="copy_module_file" />
<antcall target="copy_bizx" />
<antcall target="copy_flowx" />
</target>

<target name="copy_crm_bloc">
<property name="module.name" value="${crm.bloc}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_bpm">
<property name="module.name" value="${crm.bpm}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_branchbiz">
<property name="module.name" value="${crm.branchbiz}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_crmcommon">
<property name="module.name" value="${crm.crmcommon}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_cust">
<property name="module.name" value="${crm.cust}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_custmng">
<property name="module.name" value="${crm.custmng}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_custrelation">
<property name="module.name" value="${crm.custrelation}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_custservice">
<property name="module.name" value="${crm.custservice}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_custvalue">
<property name="module.name" value="${crm.custvalue}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_event">
<property name="module.name" value="${crm.event}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_perform">
<property name="module.name" value="${crm.perform}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_portal">
<property name="module.name" value="${crm.portal}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_product">
<property name="module.name" value="${crm.product}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_sale">
<property name="module.name" value="${crm.sale}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_statis">
<property name="module.name" value="${crm.statis}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_support">
<property name="module.name" value="${crm.support}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_tempfolder">
<property name="module.name" value="${crm.tempfolder}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_crm_workmng">
<property name="module.name" value="${crm.workmng}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_uaap_auth">
<property name="module.name" value="${uaap.auth}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_uaap_integration">
<property name="module.name" value="${uaap.integration}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_uaap_org">
<property name="module.name" value="${uaap.org}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_uaap_rights">
<property name="module.name" value="${uaap.rights}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_uaap_tools">
<property name="module.name" value="${uaap.tools}" />
<antcall target="copy_all_action" />
</target>

<target name="copy_use_util">
<property name="module.name" value="${use.util}" />
<antcall target="copy_all_action" />
</target>


<target name="copyAction">
<delete includeEmptyDirs="true" failοnerrοr="false" verbose="true">
<fileset dir="." includes="com.cdb*/bin/**" />
</delete>
</target>
<target name="del_bin">
<delete includeEmptyDirs="true" failοnerrοr="false" verbose="true">
<fileset dir="." includes="com.cdb*/bin/**" />
</delete>
</target>


</project>


[/quote]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

南天一梦N

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值