By Erik van Nieuwburg, an independent, interactive developer.

FDT, ANT and FTP

Posted: May 28th, 2009 | Author: erik | Filed under: ANT, FDT | Tags: , , |

The default installed ANT in Eclipse doesn’t seem to support FTP protocols. To be able to use this feature, you’ll need to add 2 extra *.jar files, which are:

Save these files in the following folder: /Applications/FDT3/plugins/org.apache.ant_***/bin/

Now goto: Preferences > ANT > Runtime > Classpath

The screen should be like the one below.

picture-26

Now click ‘Add External JARs’ button and select the 2 files you just added ( /Applications/FDT3/plugins/org.apache.ant_***/bin/ ). Now click ‘apply’ and then ‘ok’.

Next thing is to add code to your build.xml file, which contains all your ANT tasks.

To use FTP from within ANT you’ll need to add something like this to your build.xml file:

<target name="ftp_upload" description="uploads files through ftp">
  <echo message="uploading files" />
  <ftp server="123.456.78.90"
       port="21"
       remotedir="/www/ant_upload_test"
       userid="my_user_id"
       password="my_password"
       passive="no"
       depends="yes"
       binary="yes">
       <fileset dir="../bin" />
  </ftp>
</target>

Now you’re ready to go.

Extra info:

Good tutorial for using ANT with FDT

The official ANT homepage

More info about FTP options in ANT


One Comment on “FDT, ANT and FTP”

  1. 1 Jankees said at 15:54 on May 28th, 2009:

    Great thanks!


Leave a Reply