ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Add optional classpath support to FTP task - Bug 45860
Date Thu, 25 Sep 2008 11:35:22 GMT
On Thu, 25 Sep 2008, Greg Roodt <groodt@gmail.com> wrote:

> I have downloaded the source and am starting to get familiar with
> it, but before I go too far I want to know if this is
> possible/desirable for Ant.

Possible, probably, but non trivial.  The FTP class depends strongly
on commons-net, so in order to make it work you'd:

* have to split the FTP task into two classes (and probably throw in
  an interface for good measure)

* make sure the class that is loaded via Ant's classloader (the task)
  doesn't have any direct reference to either commons-net or the new
  class holding the FTP task's implemetation and go from there.

Something similar has been done for the JUnit task in Ant 1.7.0.
<http://svn.eu.apache.org/viewvc?view=rev&revision=381467> has been
the initial commit, which has been refined later.

> I have searched the archives and there are a few people who want the
> ability to run the FTP task without dropping the libs in
> ant_home/lib.

It is probably easier to re-<taskdef> the tasks using a <taskdef> that
has both ant-commons-net.jar and commons-net.jar in its classpath and
remove ant-commons-net.jar from ANT_HOME/lib.

<http://ant.apache.org/faq.html#delegating-classloader-1.6>

But if you want to modify the FTP task to make things work easier, you
are very welcome.  If you wanted to tackle the other commons-net
related tasks at the same time, that would be even better.

Stefan

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


Mime
View raw message