build.xml

<?xml version="1.0" encoding="GB2312"?>
<project name="chatRecord" default="build.all">
<!-- 导入环境变量 -->
<property environment="env" />
<!-- 定义编译结果目录 -->
<property name="build.path" value="dest" />
<!-- 定义classpath -->
<path id="shareLib">
<fileset dir="lib" includes="*.jar" />
</path>
<tstamp>
<format property="buildtime" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<target name="init">
<echo>创建应用目录</echo>
<delete dir="${build.path}" />
<mkdir dir="${build.path}" />
<mkdir dir="${build.path}/classes" />
<mkdir dir="${build.path}/lib" />
<mkdir dir="${build.path}/sourceFile" />
<copy todir="${build.path}/sourceFile" description="copy the common config files">
<fileset dir="sourceFile" includes="*.txt" />
</copy>
<copy todir="${build.path}/lib" description="copy the common config files">
<fileset dir="lib" includes="*.jar" />
</copy>
<copy todir="${build.path}">
<fileset dir="." includes="*.cmd, *.sh" />
</copy>
<!-- 将.sh脚本改为Unix格式 -->
<fixcrlf file="${build.path}/*.sh" eol="unix" eof="remove" />

</target>

<target name="compile" depends="init">
<javac destdir="${build.path}/classes" encoding="gb2312" target="1.6">
<src path="src" />
<classpath refid="shareLib" />
</javac>
</target>

<target name="makeJars" depends="compile">
<jar destfile="${build.path}/lib/chatRecord.jar" basedir="${build.path}/classes">
<include name="chatRecord/**" />
<include name="*.xml"/>
<manifest>
<attribute name="Build-Version" value="${version.number} Build ${env.BUILD_NUMBER}" />
<attribute name="Build-Time" value="${buildtime}" />
<attribute name="Main-Class" value="com.hdd.layout.MainLayout"/>
</manifest>
</jar>
</target>


<target name="build.all">
<antcall target="makeJars" />
<delete dir="${build.path}/classes" />
<!--
<cvs command="-Q tag ${version.number}"
cvsRoot="${cvsroot}"
package="BCDL_BIP"
dest="${appTemp.path}" />-->
<echo file="${build.path}/version.txt" append="false" message="Module-Name: ${ant.project.name}${line.separator}Build-Version: ${version.number} Build ${env.BUILD_NUMBER}${line.separator}Build-Time: ${buildtime}" />
<!-- 压缩打包 -->
<zip destfile="${build.path}/${ant.project.name}${version.number}_build${env.BUILD_NUMBER}.zip" basedir="${build.path}" level="9" />
</target>

</project>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值