| Author |
FTP files using ant
|
PNS Subramanian
Ranch Hand
Joined: Jul 13, 2004
Posts: 150
|
|
Need to ftp files using ant Have the following jar files in the classpath ant.jar ant-commons-net.jar (Is this the same as commons-net.jar ?) optional.jar jakarta-oro-2.0.7.jar Let me know if anything more is needed. I get a comment saying "Ant could not find the task or a class this task relies upon." Would appreciate any help in this regard
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
(Is this the same as commons-net.jar ?)
Well, no. ant-commons-net.jar contains common network task definitions. They rely on commons-net.jar for the actual network functionallity. Also - I don't know which version of Ant you are using, but doesn't ant-commons-net come from 1.6+ whereas optional.jar is pre1.6?
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
somkiat puisungnoen
Ranch Hand
Joined: Jul 04, 2003
Posts: 1312
|
|
Originally posted by PNS Subramanian: Need to ftp files using ant Have the following jar files in the classpath ant.jar ant-commons-net.jar (Is this the same as commons-net.jar ?) optional.jar jakarta-oro-2.0.7.jar Would appreciate any help in this regard
ant.jar have in all version of ANT. In Ant 1.6.1 have ant-common-net.jar and ant-jakarta-oro.jar. In Ant 1.5.3 have optional.jar.
ant-commons-net.jar (Is this the same as commons-net.jar ?)
Sure, it's same.
Let me know if anything more is needed. I get a comment saying "Ant could not find the task or a class this task relies upon."
What version of your ANT ? Description of common-net.jar
ftp, rexec and telnet tasks jakarta-oro 2.0.1 or later is required in any case together with commons-net. For all users, a minimum version of commons-net of 1.2.2 is recommended. Earlier versions did not support autodetection of system type or had significant bugs.
Description of jakarta-oro.jar
regexp type with mappers and the perforce tasks To use the FTP task, you need jakarta-oro 2.0.1 or later, and commons-net
|
SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
|
 |
PNS Subramanian
Ranch Hand
Joined: Jul 13, 2004
Posts: 150
|
|
Thanks for your responses. Well, guess ant version had a role in my being unable to ftp files. I used NetCommons.jar(with optional.jar) and was able to ftp files - this i understand is a pre-1.6 version of ant.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
quote: -------------------------------------------------------------------------------- ant-commons-net.jar (Is this the same as commons-net.jar ?) -------------------------------------------------------------------------------- Sure, it's same.
Ehm, not its not. Which is why (if you check the distribution of Ant 1.6+) you'll see you get both ant-commons-net.jar (which contains the taskdefs) and commons-net-*.jar which supplies the functionality the tasks use. [ September 21, 2004: Message edited by: Paul Sturrock ]
|
 |
Daniel Mayer
Ranch Hand
Joined: Sep 09, 2004
Posts: 103
|
|
Originally posted by Paul Sturrock: ant-commons-net.jar (which contains the taskdefs)
Which in prior versions could be found in optional.jar.
|
 |
 |
|
|
subject: FTP files using ant
|
|
|