diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 530e044b0..986b51fdb 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -207,6 +207,7 @@ Scott Carlson Scott M. Stirling Sean Egan Sean P. Kane +Sebastien Arod Shiraz Kanga Sebastian Kantha Simon Law diff --git a/WHATSNEW b/WHATSNEW index 5c02578cc..272bacb1b 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -426,6 +426,8 @@ Other changes: * ReplaceTokens should allow properties files. Bugzilla report 39688. +* FTP Account could not be specified in ant FTP task. Bugzilla report 39720. + Changes from Ant 1.6.4 to Ant 1.6.5 =================================== diff --git a/contributors.xml b/contributors.xml index 7204e9783..37c9062f9 100644 --- a/contributors.xml +++ b/contributors.xml @@ -836,6 +836,10 @@ P. Kane + + Sebastien + Arod + Shiraz Kanga diff --git a/docs/manual/OptionalTasks/ftp.html b/docs/manual/OptionalTasks/ftp.html index 6b0600e16..11c9c7ff7 100644 --- a/docs/manual/OptionalTasks/ftp.html +++ b/docs/manual/OptionalTasks/ftp.html @@ -73,6 +73,13 @@ try to set up a new connection.

the login password to use on the ftp server. Yes + + account + the account to use on the ftp server. + since Ant 1.7. + + No + remotedir remote directory on the @@ -689,7 +696,7 @@ selected for remove, so if you need to remove it, specify its parent in <fileset> pattern, like "somedir/**".


-

Copyright © 2000-2005 The Apache Software Foundation. All rights +

Copyright © 2000-2006 The Apache Software Foundation. All rights Reserved.

diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java index 7b92e74fc..f11d75730 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java @@ -103,6 +103,7 @@ public class FTP private String server; private String userid; private String password; + private String account; private File listing; private boolean binary = true; private boolean passive = false; @@ -1056,6 +1057,16 @@ public class FTP public void setPassword(String password) { this.password = password; } + + /** + * Sets the login account to use on the specified server. + * + * @param pAccount the account name on remote system + * @since Ant 1.7 + */ + public void setAccount(String pAccount) { + this.account = pAccount; + } /** @@ -2254,7 +2265,8 @@ public class FTP log("connected", Project.MSG_VERBOSE); log("logging in to FTP server", Project.MSG_VERBOSE); - if (!ftp.login(userid, password)) { + if ((this.account != null && !ftp.login(userid, password, account)) + || (this.account == null && !ftp.login(userid, password))) { throw new BuildException("Could not login to FTP server"); }