You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by an...@apache.org on 2006/06/06 12:52:48 UTC

svn commit: r412075 - in /ant/core/trunk: CONTRIBUTORS WHATSNEW contributors.xml docs/manual/OptionalTasks/ftp.html src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java

Author: antoine
Date: Tue Jun  6 03:52:47 2006
New Revision: 412075

URL: http://svn.apache.org/viewvc?rev=412075&view=rev
Log:
FTP Account could not be specified in ant FTP task.
Bugzilla report 39720.

Modified:
    ant/core/trunk/CONTRIBUTORS
    ant/core/trunk/WHATSNEW
    ant/core/trunk/contributors.xml
    ant/core/trunk/docs/manual/OptionalTasks/ftp.html
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java

Modified: ant/core/trunk/CONTRIBUTORS
URL: http://svn.apache.org/viewvc/ant/core/trunk/CONTRIBUTORS?rev=412075&r1=412074&r2=412075&view=diff
==============================================================================
Binary files - no diff available.

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=412075&r1=412074&r2=412075&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Tue Jun  6 03:52:47 2006
@@ -426,6 +426,8 @@
 
 * 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
 ===================================
 

Modified: ant/core/trunk/contributors.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?rev=412075&r1=412074&r2=412075&view=diff
==============================================================================
--- ant/core/trunk/contributors.xml (original)
+++ ant/core/trunk/contributors.xml Tue Jun  6 03:52:47 2006
@@ -837,6 +837,10 @@
     <last>Kane</last>
   </name>
   <name>
+    <first>Sebastien</first>
+    <last>Arod</last>
+  </name>
+  <name>
     <first>Shiraz</first>
     <last>Kanga</last>
   </name>

Modified: ant/core/trunk/docs/manual/OptionalTasks/ftp.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/OptionalTasks/ftp.html?rev=412075&r1=412074&r2=412075&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/OptionalTasks/ftp.html (original)
+++ ant/core/trunk/docs/manual/OptionalTasks/ftp.html Tue Jun  6 03:52:47 2006
@@ -74,6 +74,13 @@
     <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
                      ftp server
@@ -689,7 +696,7 @@
 <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>

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java?rev=412075&r1=412074&r2=412075&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java Tue Jun  6 03:52:47 2006
@@ -103,6 +103,7 @@
     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 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 @@
             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");
             }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org