ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <>
Subject RE: FTP ant task (revised) still not working
Date Mon, 17 Mar 2003 14:59:44 GMT
Well, looking at this more carefully (and sorry I didn't do so before,
instead of sending you on a wild-goose chase for commons-net.jar), I
must now ask why you are trying to call a defined (albeit optional)
task, <ftp> through a <taskdef>.  It isn't necessary to do so.  As long
as FTP.class is on your classpath, which you prove it is, simply putting
an <ftp> tag in your target should work without the definition of a
taskdef.  I've never tried calling a predefined task through a taskdef
and I don't know that it won't work, but you still might try calling the
ftp task without a <taskdef>, which would, if nothing else, at least
simplify the search for the cause of your problem.

You ask about 1.6.  That refers to the next version of ant - which is
available, though on an as-is basis, through the ant cvs repository.  If
you go for that version, then you will need to use commons-net instead
of NetComponents.

-----Original Message-----
From: [] 
Sent: Tuesday, March 11, 2003 4:26 PM
To: Steve Cohen; Ant Users List;
Subject: RE: FTP ant task (revised) still not working

The dir listing of my lib directory is in the original email.

Any idea why ant not complaining about it's real problem?  FTP is in the
classpath.  It is not finding something else but it is not telling me
about it.



>If you're using 1.5.2 then you still must use NetComponents. 
>commons-net doesn't come in until a 1.6 version is built.  There aren't

>any new dependencies - YET - for 1.5.2.
>Of course that just gets us back to your previous situation.
>Maybe you can send a dir listing of your distribution lib directory.
>-----Original Message-----
>From: []
>Sent: Tuesday, March 11, 2003 4:16 PM
>To: Steve Cohen; Ant Users List;
>Subject: RE: FTP ant task (revised) still not working
>I downloaded commons-net-1.0.0.jar and am
>still getting the same error (removed NetComponents.jar).
>I am using ant 1.5.2 (what does 1.6 refer to?).  I am 
>using the optional.jar provided in ant 1.5.2 which 
>has FTP.class.  any other ideas?
>It would be nice if this page were updated (if there are new
>This url is referenced in the FTP page as required dependencies.
>Also since FTP.class was in the correct folder shouldn't ant be 
>complaining about some other class or dependency instead of FTP (if the

>problem is that it can not find something)?
>thanks for your help
>>Are you possibly building from latest sources?
>>Note that in 1.6 this requires commons-net.jar in place of
>>NetComponents has moved from oro to jakarta and become commons-net.
>>-----Original Message-----
>>From: []
>>Sent: Tuesday, March 11, 2003 3:53 PM
>>Subject: FTP ant task (revised)
>>I can not get the FTP optional task to work.
>>I have the taskdev setup properly.  I have
>>all required jars in my classpath (ant, optional.jar
>>and the 3rd party jars downloaded and in my lib directory.
>>The error message from ant is:
>>   taskdef class cannot
>>be found.
>>I have unjar'd the optional.jar and it does indeed have FTP.class
>>I have checked the spelling more than once.
>>I have many other custom taskdef's setup so I know things
>>are configured properly.  What is up with FTP?  The archive seems to
>>have a lot of postings but because of all the noise there can not seem

>>to find exactly what I am looking for even after a keyword search.
>>Here is my taskdef defined in build.xml:
>>   <taskdef file="${ant.dir}/">
>>      <classpath refid="devclasspath" />
>>   </taskdef>
>>Here is the file (checkstyle, pmd and 
>>work so I know my taskdef and .properties file is setup properly)
>>	pmd=net.sourceforge.pmd.ant.PMDTask
>>Here is the ftp task
>>  <target name="devDeploy"
>>      description="Puts files (dist/*.jar) on dev server">
>>      <ftp server="${}"
>>         userid="${dev.login}"
>>         password="${dev.password}"
>>         remotedir="${dev.deploy.dir}"
>>         separator="/"
>>         verbose="yes">
>>         <!-- local files to deploy -->
>>         <fileset dir="${dist.dir}">
>>            <include name="**/*.jar"/>
>>         </fileset>
>>      </ftp>
>>   </target>
>>Here is my dev classpath setup
>>   <path id="devclasspath">
>>      <fileset dir="${devlib.dir}">
>>         <include name="**/*.jar" />
>>      </fileset>
>>   </path>
>>other ant targets that depend on jars here is working so I know
>>devclasspath is setup properly.
>>Here is a listing of files in devlib
>>$ ls -lt
>>total 5885
>>-r--r--r--    1          mkgroup     27635 Mar 11 11:11 sax-2.0.1.jar
>>-r--r--r--    1          mkgroup    350525 Mar 11 11:11
>>-r--r--r--    1          mkgroup     65383 Mar 11 11:11 oro-2.0.6.jar
>>-r--r--r--    1          mkgroup     89584 Mar 11 11:11 jdom-1.0b8.jar
>>-r--r--r--    1          mkgroup    905948 Mar 11 11:11
>>-r--r--r--    1          mkgroup     12807 Mar 11 11:11
>>-r--r--r--    1          mkgroup     27052 Mar 11 11:11 jaxp-1.2.jar
>>-r--r--r--    1          mkgroup     25898 Mar 11 11:11
>>-r--r--r--    1          mkgroup    885250 Mar 10 14:05 xercesImpl.jar
>>-r--r--r--    1          mkgroup    108484 Mar 10 14:05 xml-apis.jar
>>-r--r--r--    1          mkgroup    668804 Mar 10 14:04
>>-r--r--r--    1          mkgroup    732490 Mar 10 14:04 ant-1.5.2.jar
>>-r--r--r--    1          mkgroup     92484 Mar 10 13:31
>>-r--r--r--    1          mkgroup     10403 Mar 10 11:55
>>-r-xr-xr-x    1 Administ mkgroup    711466 Mar  6 10:52 pmd-1.03.jar
>>-r-xr-xr-x    1 Administ mkgroup     20357 Mar  6 10:52
>>-r-xr-xr-x    1 Administ mkgroup     29871 Mar  6 10:52
>>-r-xr-xr-x    1 Administ mkgroup     30117 Mar  6 10:52
>>-r-xr-xr-x    1 Administ mkgroup    146737 Mar  6 10:52
>>-r-xr-xr-x    1 Administ mkgroup    681198 Mar  6 10:52
>>-r-xr-xr-x    1 Administ mkgroup    110531 Mar  6 10:52
>>-r-xr-xr-x    1 Administ mkgroup    281910 Mar  6 10:52
>>checkstyle, pmd, jalopy work so I know my dev classpath is setup
>>properly. I know that my taskdef is setup properly.
>>any help would be appreciated
Get Your FREE FlashMail Address now at It's
Free, Easy, & Fun !!!

View raw message