Use ant checkout sourcecode from CVS/SVN

来源:互联网 发布:node.js 教程 pdf 编辑:程序博客网 时间:2024/06/05 18:10

build.xml for CVS 

<?xml version="1.0"?><project name="Example Remote Build for CVS" default="checkout" basedir="."><property name="local_root" value="local_project_root"/><property name="remote_cvsroot" value=":pserver:builder@server_ip:/cvsroot" />    <target name="checkout">       <cvspass cvsroot=":pserver:builder@server_ip:/cvsroot" password="builder"/> <echo message="Checking out the required sources from CVS"/>        <cvs cvsroot="${remote_cvsroot}" quiet="true" command="checkout -P dir/project_name" dest="${local_root}" compression="true" />    </target> </project>

 

 

build.xml for SVN 

when we want to use ant checkout code from SVN, we need svnant tool which SVN supported.

For more information, please refer to the following links.

http://subclipse.tigris.org/svnant/svn.html

 <?xml version="1.0"?>

<project name="Example Remote Build" default="checkout" basedir="."><property name="ant_home_lib" value="...../apache-ant-1.9.3/lib"/><property name="local_root" value="local_project_root/"/><!-- the following jar is needed to SVN --> <path id="svnant.classpath">          <pathelement location="${ant_home_lib}/svnant.jar"/>          <pathelement location="${ant_home_lib}/svnkit.jar"/>          <pathelement location="${ant_home_lib}/svnClientAdapter.jar"/>          <pathelement location="${ant_home_lib}/svnjavahl.jar"/>          <pathelement location="${ant_home_lib}/*.jar"/>    </path>    <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />    <svnSettingsvnkit="false"javahl="false"username="name" password="pwd"id="svn.settings"/>  <target name="checkout">  <svn refid="svn.settings" >  <checkout url="http://ip/repos/prject_name/trunk/" destPath="${local_root}" revision="HEAD"/>   </svn>   </target>  </project>

 ----


阅读全文
0 0