Browse Source

FTP Account could not be specified in ant FTP task.

Bugzilla report 39720.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@412075 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 19 years ago
parent
commit
31c6b1478b
5 changed files with 28 additions and 2 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +2
    -0
      WHATSNEW
  3. +4
    -0
      contributors.xml
  4. +8
    -1
      docs/manual/OptionalTasks/ftp.html
  5. +13
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java

+ 1
- 0
CONTRIBUTORS View File

@@ -207,6 +207,7 @@ Scott Carlson
Scott M. Stirling
Sean Egan
Sean P. Kane
Sebastien Arod
Shiraz Kanga
Sebastian Kantha
Simon Law


+ 2
- 0
WHATSNEW View File

@@ -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
===================================



+ 4
- 0
contributors.xml View File

@@ -836,6 +836,10 @@
<middle>P.</middle>
<last>Kane</last>
</name>
<name>
<first>Sebastien</first>
<last>Arod</last>
</name>
<name>
<first>Shiraz</first>
<last>Kanga</last>


+ 8
- 1
docs/manual/OptionalTasks/ftp.html View File

@@ -73,6 +73,13 @@ try to set up a new connection.</p>
<td valign="top">the login password to use on the ftp server.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">account</td>
<td valign="top">the account to use on the ftp server.
<em>since Ant 1.7</em>.
</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">remotedir</td>
<td valign="top">remote directory on the
@@ -689,7 +696,7 @@ selected for remove, so if you need to remove it, specify its parent in
<code>&lt;fileset&gt;</code> pattern, like <code>"somedir/**"</code>.
</p>
<hr>
<p align="center">Copyright &copy; 2000-2005 The Apache Software Foundation. All rights
<p align="center">Copyright &copy; 2000-2006 The Apache Software Foundation. All rights
Reserved.</p>

</body>


+ 13
- 1
src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java View File

@@ -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");
}



Loading…
Cancel
Save