CVS update : CVS « Ant « Java






CVS update

<?xml version="1.0"?>
<project name="Java XP Cookbook" default="build" basedir=".">

  <target name="prepare">
    <!-- convert the CVS repository directory into
         a fully-qualitied Windows directory -->
    <pathconvert targetos="windows" property="cvsrepository.path">
       <path>
         <pathelement location="repository"/>
       </path>
    </pathconvert>
    <!-- store the CVS root in a property -->
    <property name="cvsroot" value=":local:${cvsrepository.path}"/>


    <!-- determine if the files have been checked out -->
    <available file="cookbook" type="dir" property="already.checked.out"/>
    
  </target>

  <target name="clean"
          description="Remove the entire cookbook directory.">
    <delete dir="cookbook"/>
  </target>

  <target name="cvscheckout" depends="prepare" unless="already.checked.out">
    <cvs cvsroot="${cvsroot}"
         package="cookbook"/>
  </target>

  <target name="cvsupdate" depends="prepare" if="already.checked.out">
    <cvs command="update -dP"
         cvsroot="${cvsroot}"
         dest="cookbook"/>
  </target>

  <target name="build" depends="cvscheckout,cvsupdate">
    <ant dir="cookbook" target="all" inheritAll="false"/>
  </target>


</project>


           
       








AntCVSCheckout.zip( 1 k)

Related examples in the same category

1.Check out source code from cvs
2.Check out from CVS