Nevermind. I read the stackoverflow article<http://stackoverflow.com/questions/472559/how-to-load-an-optional-task-into-ant-without-lib-or-global-installation/858744#858744>more carefully and when I followed all the instructions it totally worked:
Here's my sample script. I have ant-classloadertask.jar<http://enitsys.sourceforge.net/ant-classloadertask/>and commons-net-3.2.jar <http://commons.apache.org/proper/commons-net/> in my current working directory. <project name="test" default="main" xmlns:jt="antlib:net.sf.enitsys.jtools"> <property name="libpath" value="."/> <taskdef uri="antlib:net.sf.enitsys.jtools" resource="net/jtools/classloadertask/antlib.xml" classpath="${libpath}/ant-classloadertask.jar"/> <jt:classloader loader="system" classpath="${libpath}/commons-net-3.2.jar"/> <target name="main"> <ftp server="linux-files.com" userid="anonymous" password="" action="list" listing="list.txt"> <fileset includes="*"/> </ftp> </target> </project> On Thu, Mar 21, 2013 at 10:49 AM, Harold Putman <hput...@lexmark.com> wrote: > I am using the <ftp> task which requires commons-net-3.2.jar. > > I can make this work by specifying "-lib commons-net-3.2.jar" when I > invoke ant, but I would like to put something in my build file to load this > library without needed -lib. > > This article from 2009 explains how to solve it > > http://stackoverflow.com/questions/472559/how-to-load-an-optional-task-into-ant-without-lib-or-global-installation/858744#858744 > > But it doesn't work for me (ant 1.8.4). Is there a new way to do this now? > > Thanks in advance. > > -- Harold PUTMAN Web Technology Specialist *Lexmark International, Inc. <http://www.lexmark.com>* 740 W New Circle Rd. Lexington, KY 40550 +1(859) 232-2839 hput...@lexmark.com