我試圖從一個ftp服務器下載螞蟻的子目錄中的文件。 確切的文件集是已知的。 其中一些是在子目錄中。 Ant似乎只下載根目錄中的那些。 如果我下載沒有列出所有文件的文件,它可以工作。ant ftp不下載子目錄中的文件
第一個ftp操作應該完成與第二個完全相同的操作。 相反,我得到「隱藏文件\\ a \ a.txt假定不是符號鏈接。」
有沒有人知道這裏有什麼問題? 這是螞蟻FTP任務中的錯誤嗎?
<?xml version="1.0" encoding="utf-8"?>
<project name="example" default="example" basedir=".">
<taskdef name="ftp"
classname="org.apache.tools.ant.taskdefs.optional.net.FTP" />
<target name="example">
<!-- doesn't work -->
<ftp action="get" verbose="true"
server="localhost" userid="example" password="example"
remotedir="">
<fileset dir="downloads" casesensitive="false"
includes="a/a.txt,a/b/ab.txt,c/c.txt" />
</ftp>
<!-- works (but requires multiple ftp tasks) -->
<ftp action="get" verbose="true"
server="localhost" userid="example" password="example"
remotedir="a">
<fileset dir="downloads" casesensitive="false"
includes="a.txt,b/ab.txt" />
</ftp>
<ftp action="get" verbose="true"
server="localhost" userid="example" password="example"
remotedir="c">
<fileset dir="downloads" casesensitive="false"
includes="c.txt" />
</ftp>
</target>
</project>
更新:我發佈了關於這個bug到共享網絡JIRA https://issues.apache.org/jira/browse/NET-324
更新:我添加了一個錯誤報告螞蟻錯誤報告系統https://issues.apache.org/bugzilla/show_bug.cgi?id=49296
是我做到了。這並不能解決問題。 – 2010-05-10 16:51:34