|
ant脚本如下
<?xml version="1.0"?>
<project name="plat-appframework" default="deploy" basedir=".">
<!-- all properties are in build.properties -->
<property name="classes" value="build/classes"/>
<property name="build" value="build"/>
<property name="svnbasedir" value="svn://192.168.1.147/plat/plat20101129/05plat-appframework/trunk"/>
<property name="projectName" value="plat-appframework"/>
<property name="lib" value="${projectName}\WebRoot\WEB-INF\lib"/>
<property name="src" value="${projectName}\src"/>
<property name="deployPath" value="/opt/share/product/PLAT/plat-appframeworkV1.8"/>
<tstamp>
<format property="TODAY_UK" pattern="d-MMMM-yyyy" locale="en"/>
</tstamp>
<tstamp>
<format property="TODAY_CN" pattern="d-MMMM-yyyy" locale="zh"/>
</tstamp>
<path id="classpath">
<fileset dir="${lib}" includes="**/*.jar" />
</path>
<path id="javaEE1.4">
<fileset dir="/opt/apach/libraryset/1.4">
<include name="**/*.jar" />
</fileset>
</path>
<target name="export">
<exec executable="/bin/sh">
<arg line="-c 'svn delete ${svnbasedir}/02source/control/${DSTAMP} -m ${DSTAMP} --username xiesisi --password xiesisi123'"/>
</exec>
<exec executable="/bin/sh">
<arg line="-c 'svn mkdir ${svnbasedir}/02source/control/${DSTAMP} -m ${DSTAMP} --username xiesisi --password xiesisi123'"/>
</exec>
<exec executable="/bin/sh">
<arg line="-c 'svn copy ${svnbasedir}/02source/current/${projectName} ${svnbasedir}/02source/control/${DSTAMP} -m ${DSTAMP} --username xiesisi --password xiesisi123'"/>
</exec>
<exec executable="/bin/sh">
<arg line="-c 'svn copy ${svnbasedir}/01doc/06db ${svnbasedir}/02source/control/${DSTAMP} -m ${DSTAMP} --username xiesisi --password xiesisi123'"/>
</exec>
<exec executable="/bin/sh">
<arg line="-c 'svn copy ${svnbasedir}/02source/current/${projectName}/version.txt ${svnbasedir}/02source/control/${DSTAMP} -m ${DSTAMP} --username xiesisi --password xiesisi123'"/>
</exec>
<exec executable="/bin/sh">
<arg line="-c 'svn checkout ${svnbasedir}/02source/control/${DSTAMP}/${projectName} --username xiesisi --password xiesisi123'"/>
</exec>
<exec executable="/bin/sh">
<arg line="-c 'svn export ${svnbasedir}/02source/control/${DSTAMP}/version.txt ./${projectName}/WebRoot/version.txt --username xiesisi --password xiesisi123'"/>
</exec>
</target>
<target name="clean">
<delete dir="build"/>
<delete dir="./${projectName}"/>
</target>
<target name="compile" depends="clean, export">
<mkdir dir="${classes}"/>
<javac encoding="gbk" srcdir="${src}" destdir="${classes}" includeantruntime="false" >
<!--lib dir="${lib}"/-->
<classpath>
<path refid="classpath">
</path>
<path refid="javaEE1.4">
</path>
</classpath>
</javac>
<copy todir="${classes}">
<fileset dir="${src}" excludes = "**/*.svn, **/*.java"/>
</copy>
</target>
<target name="war" depends="compile">
<war destfile="${build}/${projectName}${DSTAMP}.war" webxml="./${projectName}/WebRoot/WEB-INF/web.xml">
<fileset dir="./${projectName}/WebRoot" excludes = "**/*.svn, **/*.class"/>
<fileset dir="./${projectName}">
<include name="tmpExcel"/>
<include name="tmpExcel/**"/>
</fileset>
<classes dir="${classes}"/>
</war>
</target>
<target name="deploy" depends="war">
<mkdir dir="${deployPath}/${DSTAMP}${projectName}"/>
<copy todir="${deployPath}/${DSTAMP}${projectName}">
<fileset file="${build}/${projectName}${DSTAMP}.war"/>
</copy>
<exec executable="/bin/sh">
<arg line="-c 'svn export ${svnbasedir}/02source/control/${DSTAMP}/06db ${deployPath}/${DSTAMP}${projectName}/06db --username xiesisi --password xiesisi123 --force'"/>
</exec>
<exec executable="/bin/sh">
<arg line="-c 'svn export ${svnbasedir}/02source/control/${DSTAMP}/version.txt ${deployPath}/${DSTAMP}${projectName}/version.txt --username xiesisi --password xiesisi123 --force'"/>
</exec>
</target>
</project>
发布的时候,06db下的内容只有1个sql且只有1k的大小,但是版本控制下的内容有6个文件,为什么这样啊????请高手指教,谢谢了 |
|