首先要想checkout工程先检查有没有cvs.exe文件.去环境变量所指的jdk的bin目录下找,或者将cvs.exe文件拷贝到与你构建的文件相同的目录下.然后构建build文件.就可以了.
<?xml version="1.0"?>
<project name="duiduihu" basedir="." default="checkout">
<property name="build" value="build"/>
<property name="src" value="src"/>
<property name="cvs.package" value="ElectronicCommerceFlat_2"/>
<property name="cvs.dir" value=":pserver:wsg:wsg@192.168.1.251:/ehu_cvs"/>
<target name="init" description="create directory">
<mkdir dir="${build}"/>
<mkdir dir="${cvs.package}"/>
<cvspass cvsroot="${cvs.dir}" password="wsg"/>
</target>
<target name="clean" description="clean dir" depends="init">
<delete dir="${build}" quiet="false"/>
</target>
<target name="checkout" description="Update package from CVS">
<cvs cvsroot="${cvs.dir}" package="${cvs.package}" dest="." command="checkout" cvsrsh="ssh" />
</target>
</project>
<?xml version="1.0"?>
<project name="duiduihu" basedir="." default="checkout">
<property name="build" value="build"/>
<property name="src" value="src"/>
<property name="cvs.package" value="ElectronicCommerceFlat_2"/>
<property name="cvs.dir" value=":pserver:wsg:wsg@192.168.1.251:/ehu_cvs"/>
<target name="init" description="create directory">
<mkdir dir="${build}"/>
<mkdir dir="${cvs.package}"/>
<cvspass cvsroot="${cvs.dir}" password="wsg"/>
</target>
<target name="clean" description="clean dir" depends="init">
<delete dir="${build}" quiet="false"/>
</target>
<target name="checkout" description="Update package from CVS">
<cvs cvsroot="${cvs.dir}" package="${cvs.package}" dest="." command="checkout" cvsrsh="ssh" />
</target>
</project>