ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45860] Optional classpath entry support for FTP task
Date Wed, 22 Oct 2008 05:48:14 GMT

--- Comment #4 from Robert Flaherty <>  2008-10-21 22:48:14
PST ---
My need was to get FTP to work without adding jars to %ANT_HOME%/lib or
${user.home}/.ant/lib, but rather use jars relative to my project so that each
developer didn't have to do anything on their machine.  I had to delve into the
code, and although this may not work in the future, it does right now:

        <path id="wptg.classpath">
                <fileset dir="${}"
includes="commons-net-1.4.1.jar" />
                <fileset dir="${}"
includes="jakarta-oro-2.0.8.jar" />
                <fileset dir="${ant.library.dir}"
includes="ant-commons-net.jar" />
        <classloader classpathref="wptg.classpath" parentFirst="false" />
        <taskdef name="wptg-ftp"
loaderref="ant.coreLoader" />

With the name off of <classloader>, it creates a new AntClassLoader with the
optional jars, and ant-common-net.jar.  If memory serves, specifying
classpathref for the taskdef failed b/c the FTP task was loaded by the
bootstrap classloader, and couldn't see the FTPClient class.  I stuck with this
as my method for adding more optional jars for the project as a whole.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message