As with any development project there always comes a time to ship code. Either this is a JAR file that has to be updated on a remote server, or, if the project is an open-source initiative, you are about to make the latest source code available on the Web. You can easily integrate this functionality into your build file using the optional <ftp> task, which makes interfacing to any FTP server a trivial exercise. This task is basically a wrapper to the FTP class available in the Netcomponents suite. The basic FTP commands available are get, put, del, list, chmod, and mkdir.

Table 5.6 shows the attributes available to the <ftp> task.

Table 5.6. Table of <ftp> Attributes
Attributes Description
userid The username for the FTP server.
password ...

Get Ant Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.