DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22726>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22726 SCP task fails with zero targets Summary: SCP task fails with zero targets Product: Ant Version: 1.6Alpha (nightly) Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Optional Tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When the SCP task receives an empty file set, it hangs permanently. Looking in org.apache.tools.ant.taskdefs.optional.ssh.ScpToMessage.java, in the method doMultipleTransfer, you'll see: channel.connect(); waitForAck(in); for (Iterator i = directoryList.iterator(); i.hasNext();) { Directory current = (Directory) i.next(); sendDirectory(current, in, out); } waitForAck(in); Now, to my mind, this will connect, and wait for an ack, then send all directories, and wait for another ack. But what if directoryList is empty? We effectively end up with waitForAck(in) called twice in succession, without any actions in between. It would therefore appear that the SCP task is waiting for an ack it wouldn't get. Replacing the second ack with: if (directoryList.size()!=0) { waitForAck(in); } Should fix it. [Note - I do not have an Ant development environment set up, so I am unable to test this fix]. Upayavira [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]