antを使用してftpサーバーからサブディレクトリ内のファイルをダウンロードしようとしています。ファイルの正確なセットは既知です。それらのいくつかはサブディレクトリにあります。Antは、ルートディレクトリにあるものだけをダウンロードしているようです。リストせずにすべてのファイルをダウンロードすると機能します。
最初のftpアクションは、2番目のアクションとまったく同じことを実行する必要があります。代わりに、「隠しファイル\\ a\a.txtはシンボリックリンクではないと見なされます」というメッセージが表示されます。
ここで何が悪いのか誰か知っていますか?これはantFTPタスクのバグですか?
<?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>
更新:これに関するバグをCommons Netjirahttps://issues.apache.org/jira/browse/NET-324に投稿しまし た
更新: antバグレポートシステムにバグレポートを追加しましたhttps://issues.apache.org/bugzilla/show_bug.cgi?id=49296