Ant-Model:從CVS程式碼程式庫檢出代碼

來源:互聯網
上載者:User


為了使用Ant構建面向持續整合的開發過程,使各種Ant指令碼可以作為模組根據需要動態增加

1、為了讓不同的使用者使用相同的Ant指令碼,將CVS的使用者資訊儲存在cvsuser.properties中

2、為了讓不同的項目可以複用Ant指令碼,將項目資訊儲存在project.properties中。

 

cvsuser.properties

  1. ##
    #
    ##
  2. #
    cvsuser = cvsusername
  3. #
    cvspass = cvspass
  4. #
    cvs.repository = :pserver:${cvsuser}:${cvspass}@127.0.0.1:/cvsdata
  5. #
  6. ciroot = ../CI
    checkout.dir = ${ciroot}/CheckOut

 

project.properties

  1. ##
    #
    ##
  2. #
    project.name=webservice
  3.  

build.xml

 

  1. <?xml version="1.0"?>
  2. <project name="AntCVS" basedir="." default="checkOut">
  3.  <!-- ============================ -->
  4.  <!-- ===  Properties setting  === -->
  5.  <!-- ============================ -->
  6.  <!-- Load system specific properties -->
  7.  <property file="custom.properties" />
  8.  <!-- Load default properties -->
  9.  <property file="build.properties" />
  10.  <!-- Load project properties -->
  11.  <property file="project.properties" />
  12.   <!-- Load cvsuser properties -->
  13.  <property file="cvsuser.properties" />
  14.  <!-- ================================= 
  15.           target: checkOut              
  16.          ================================= -->
  17.   <target name="checkOut" depends="" description="CheckOut webservice sources ">
  18.        <mkdir dir="${checkout.dir}" />
  19.        <cvs cvsRoot="${cvs.repository}" package="${project.name}" dest="${checkout.dir}" />
  20.  </target>
  21. <!-- ================================= 
  22.           target: clean              
  23.          ================================= -->
  24.   <target name="clean" depends="" description="">
  25.        <delete dir="${checkout.dir}" />
  26.  </target>
  27. </project>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.