Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

another ant question (ftp)

Thread view: 
slippymississippi@yahoo.com - 09 Dec 2005 06:14 GMT
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?
Rhino - 09 Dec 2005 14:19 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.