ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject Re: possible patch for FTP task
Date Wed, 24 Mar 2004 02:13:29 GMT
I won't comment on the quality of Mr. Peer's patch, but, in response to 
Antoine's question I would say that Ant and not commons-net is the proper 
place to handle this.  Commons-net's FTPClient class has no concept of a 
"session" during which a connection stays open to perform multiple tasks.  
Nor are there methods there for getting a list of files. The Ant code is 
building a collection of files to transfer, and then, one-by-one, calling 
getFile(), sendFile() etc., on a connection that it has opened.  In other 
words, Ant is already managing the "session" and it can hardly be otherwise.  
Therefore if this functionality is desired, I believe that Ant is the right 
place to implement it.

I might also suggest looking into why the ftp server is resetting so often.  
There might be simpler server-level fix that could make this problem go away.


On Tuesday 23 March 2004 3:28 pm, Antoine Lévy-Lambert wrote:
> Hi Joe,
>
> I suggest you create a bugzilla report (
> http://issues.apache.org/bugzilla) concerning this, and you attach your
> patch there.
> I am not sure however whether this problem should best be handled in the
> ant task or in commons-net.
>
> I hope that Steve Cohen will see these postings.
>
> Cheers,
>
> Antoine
>
> Joe Peer wrote:
> > dear Ant developers,
> >
> > today i tried the FTP task and I ran into the problem that my FTP
> > server (runs on windows) resetted the connections quite frequently
> > (i've used the most recent versions of ant and commons-net), resulting
> > in an abort of the FTP task and build failure.
> >
> > Therefore, i slightly adjusted the sourcecode of
> > org.apache.tools.ant.taskdefs.optional.net.FTP to re-connect to the
> > server in case of an error, just like many of the GUI based FTP
> > clients do (e.g. SmartFTP).
> >
> > I have added an attribute "maxAttempts" to define how often the FTP
> > task should re-connect/retry before it gives up (default value is 1,
> > to ratain un-patched behavior).
> >
> > pls. let me know if you think that this patch could be helpful and
> > where i should send it to,
> >
> > kind regards,
> > Joe Peer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org


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


Mime
View raw message