The optional Ant task FTP task requires that "optional.jar" be installed in the ANT_HOME\lib folder. No problem, I thought, it's there. But when I tried to write a target using the FTP task I got this runtime error:
BUILD FAILED file:D:/PROJECTS/BenchMark/build.xml:76: Could not create task or type of type: ftp. Ant could not find the task or a class this task relies upon. Well, I can see "FTP.class" in the optional.jar file, so what's up - why can't Ant "find the task"? It turns out that ftp and telnet tasks require additional libraries. It's not terribly easy to find this in the Ant javadocs under "Library Dependencies", and even harder to find the URL for netcomponents.jar (so see the links above for a shortcut). So I copied NetComponents.jar into the Ant /lib folder and - voila - now the FTP task works:
tini_load:
[ftp] Opening FTP connection to 166.70.144.54
[ftp] connected
[ftp] logging in to FTP server
[ftp] login succeeded
[ftp] sending files
[ftp] transferring D:\PROJECTS\BenchMark\tinibuild\BenchMark.tini
[ftp] File D:\PROJECTS\BenchMark\tinibuild\BenchMark.tini copied to 166.70.144.54
[ftp] 1 files sent
[ftp] disconnecting
[echo] TINI FTP download complete |