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=5053>. 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=5053 the optional FTP task does not perform it's action without a remote dir specified Summary: the optional FTP task does not perform it's action without a remote dir specified Product: Ant Version: 1.4.1 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Optional Tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Although it is not a required attribute, the optional FTP task does not do anything useful (only logs in and out) if the 'remotedir' attribute is not specified. Setting the remotedir to "." is a workaround to this problem. I examined the source and found the problem in an if-then-else that is a bit too liberal. The following snippet fixes the problem: public void execute() throws BuildException { [snip] if( action == MK_DIR ) { makeRemoteDir( ftp, remotedir ); } else { if (remotedir != null) { log("changing the remote directory", Project.MSG_VERBOSE); ftp.changeWorkingDirectory(remotedir); if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) { throw new BuildException( "could not change remote directory: " + ftp.getReplyString()); } } log(ACTION_STRS[action] + " files"); transferFiles(ftp); } } catch(IOException ex) { [snip] (Otherwise, FTP with ANT works great by the way). -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
