First page Back Continue Last page Graphics

Defining Ant Deployment Tasks


Notes:

Defining Ant Deployment Tasks

The set of core Ant tasks that you can find in the Component Palette includes several that you can use in the deployment process. For example, to create and use archive files, you can employ the tasks <jar>, <ejbjar>, <ear>, <war>, <unjar>, and <unwar>.

You use the following tasks for local server deployment:

<copy>: Copies a file or FileSet (group of files) to a new file or directory

<delete>: Deletes a single file, a specified directory and all its files and subdirectories, or a set of files specified by one or more FileSets

<java>: Executes a Java class within the running (Ant) VM or forks another VM if specified

The following core Ant tasks are useful for remote deployment:

<ftp>: Implements a basic FTP client that can send, receive, list, and delete files, and create directories

<condition>: Sets a property to true by default if a certain condition holds true; otherwise, the property is not set. You can set the value to something other than the default by specifying the value attribute.

<sleep>: A task for pausing for a short period of time. It is useful when a build or deployment process requires an interval between tasks.

<waitfor>: Blocks execution until a set of specified conditions becomes true

<get>: Gets a file from a URL