ant中get, ftp上传下载删除的用法

1) get

<target name="test">
  <get src="http://cn-1.1.10.jar" dest="some\"/>
</target>

2) ftp

<!--action不指定默认就是上传-->

<target name= "ftp.upload">
  <ftp server="xxx.xx.10.49"s
       userid="anonymous"
       password="me@myorg.com"
      remotedir="/second">
    <fileset dir=".">
      <include name="*.apk"/>
    </fileset>
  </ftp>
</target>

 

<!--假如要download的文件夹没有文件,那么空文件夹不会下载下来,删除同理-->

<target name= "ftp.download">
  <ftp action="get"
  server="xxx.xx.10.49"
       userid="anonymous"
       password="me@myorg.com"
  remotedir="second">
    <fileset dir="second">
  <include name="**"/> 
    </fileset>
  </ftp>
</target>

 

<target name= "ftp.del">
  <ftp action="del"
    server="xxx.xx.10.49"
        userid="anonymous"
       password="me@myorg.com" > 
   <fileset dir="second">    
   </fileset>

  </ftp>
</target>

posted on 2012-02-27 18:01  lightideal  阅读(1443)  评论(0编辑  收藏  举报

导航