I wanted to use the ftp optional task defined for ant 1.6.5. I copied
the oro and commons.net jars to the ant/lib directory, rebuilt ant, and
ant still claims it doesn't understand the task "ftp." What am I doing
wrong?
> I wanted to use the ftp optional task defined for ant 1.6.5. I copied
> the oro and commons.net jars to the ant/lib directory, rebuilt ant, and
> ant still claims it doesn't understand the task "ftp." What am I doing
> wrong?
Well, that's pretty hard to answer since you haven't provided a single line
of code. Why don't you post your task, as well as any global variables that
it is using, so that we have a fighting chance of answering your question?
Or post to the ant user mailing list, which would have been the more
appropriate choice in the first place. You can subscribe here:
http://ant.apache.org/mail.html
Rhino
slippymississippi@yahoo.com - 09 Dec 2005 15:05 GMT
> Well, that's pretty hard to answer since you haven't provided a single line
> of code.
Why would you want to look at code to answer an ant question?
Andrew Thompson - 09 Dec 2005 15:25 GMT
...
>>Well, that's pretty hard to answer since you haven't provided a single line
>>of code.
>
> Why would you want to look at code to answer an ant question?
Probably because a combination of your code and Ant code is
producing an error. I'd give odds that it is not the Ant code.

Signature
Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
slippymississippi@yahoo.com - 09 Dec 2005 16:26 GMT
> Probably because a combination of your code and Ant code is
> producing an error. I'd give odds that it is not the Ant code.
There is no code. I am trying to kick off an Ant ftp task as a type of
ftp hello world. That's the only task in my xml file:
<project name="tryftp" default="copyfiles" basedir=".">
<target name="copyfiles">
<ftp server="199..." userid="me" password="${mypwd}" action="get">
<fileset dir="mydir">
<include name="helloworld.txt">
</fileset>
</ftp>
</target>
</project>
BUILD FAILED
... Could not create task or type of type: ftp.
Ant could not find the task or a class this task relies upon.
slippymississippi@yahoo.com - 09 Dec 2005 18:43 GMT
I noticed that the ant installation guide is a little hard to follow
when installing the necessary jars for ftp. It talks about downloading
the oro and commons.net option jars, but then it also mentions the
optional jar. I didn't realize at first that this is referencing
ant-optional.jar, no the other two optional jars.
However, now I can't find where the download site is for
ant-optional.jar ...
Rhino - 09 Dec 2005 22:13 GMT
>> Probably because a combination of your code and Ant code is
>> producing an error. I'd give odds that it is not the Ant code.
[quoted text clipped - 16 lines]
>
> Ant could not find the task or a class this task relies upon.
I tried to duplicate your problem.
I downloaded Ant 1.6.5 and installed it. I set ANT_HOME to the location
where I had installed Ant 1.6.5. I dropped the two jars,
commons-net-1.4.1.jar and jakarta-oro-2.0.8.jar in the lib subdirectory of
Ant 1.6.5. I executed a test script that has an ftp task as a key element of
the script.
The script worked fine, which shows that the ftp task should execute
correctly if you put the oro and commons-net jars in the lib subdirectory of
Ant. Try that and you should be fine.
Rhino
Rhino - 09 Dec 2005 20:00 GMT
>> Well, that's pretty hard to answer since you haven't provided a single
>> line
>> of code.
>
> Why would you want to look at code to answer an ant question?
Sorry to be unclear; I didn't mean your Java code, I meant the ftp task in
your Ant script.
Rhino
slippymississippi@yahoo.com - 09 Dec 2005 20:44 GMT
> Sorry to be unclear; I didn't mean your Java code, I meant the ftp task in
> your Ant script.
I know, I was just kidding. Thanks for the java mailing list info,
sorry to be such a noobie.
Rhino - 09 Dec 2005 21:31 GMT
>> Sorry to be unclear; I didn't mean your Java code, I meant the ftp task
>> in
>> your Ant script.
>
> I know, I was just kidding. Thanks for the java mailing list info,
> sorry to be such a noobie.
There's nothing wrong with being new to Java so there's nothing to apologize
for. We were all new to Java once :-)
See elsewhere in this thread for information on your problem from me.
Rhino