下载文件:
<!-- 将154上最新编译的FTP资源SWF文件复制到本地目录-->
<target name="ftpSwfToLocal">
<ftp action="get"
server="10.45.7.154"
userid="devflex"
password="smart"
remotedir="/ztesoft/devflex/java/webportal/WebContent/i18n/en_US/">
<fileset dir="d:/javaWorkspace/cvbs/WebContent/i18n/en_US">
<include name="**/*swf"/>
</fileset>
</ftp>
<echo message = "d:/javaWorkspace/cvbs/WebContent/i18n/en_US ---> ftpGet"/>
</target>
问题1、报错找不到“Could not create type ftp due to java.lang.NoClassDefFoundError:
org/apache/commons/net/ftp/FTPClientConfig”
解决:少了两个包:commons-net-1.4.1.jar和jakarta-oro-2.0.8.jar
将这两个包加入到
<!--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>
相关推荐
ant实现ftp上传需要的jar包,包括jakarta-oro-2.0.8.jar,commons-net-1.4.1.jar,已测试可以使用。
ant ftp需要的jar
ant ant下载 ant配置ant ant下载 ant配置ant ant下载 ant配置
org.apache.tools.ant.Main org.apache.tools.ant.Task org.apache.tools.bzip2.CRC org.apache.tools.ant.Target org.apache.tools.ant.Project org.apache.tools.zip.ZipFile org.apache.tools.zip.ZipLong ...
ant 实现打包,发版,telnet ftp 自动化
9_ant_通过ftp发布文件9_ant_通过ftp发布文件
蚂蚁金服 ant design 中下载axure 菜单组件库
(总结版) Ant 从SVNCVS下载 编译打包部署到本地远程服务器 (FTP上传).docx
(总结完整版)Ant从SVNCVS下载编译打包部署到本地远程服务器(FTP上传).pdf
ant工具使用
ant ant ant antant ant ant antant ant ant ant
Java语言编写的ant程序,主要实现了文件的上传与下载功能。
ant ftp 的两个jar包,把两个jar包放ant的安装目录下的lib文件夹里即可
java ant use 介绍了java中ant的使用方法与技巧,
里面包括ant中文书籍,说明ant的使用。和ant1.7.1版本
主要介绍了Ant Design Pro 下实现文件下载的实现代码,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6...
项目中Ant配置的实例,一次配置 稍微改动 到处使用
ant自动编译,上传,启动,部署,启动,带详细的说明文档,希望对大家有所帮助
ant中文帮助文档 比较全面 对于刚开始学ant的同学很有帮助