First page Back Continue Last page Graphics

Using Ant to Automate the Deployment Process


Notes:

Deploying with Ant

The Java-based Ant tool is a programmatic approach for building and deploying Java EE applications. It offers many advantages, such as an abundance of documentation and expertise, wide adoption of the tool, and the relative ease with which developers can configure this tool to help them automate the build-and-deploy cycle. In addition, because Ant is written in Java, developers can extend the functionality by writing their own custom tasks. Ant has built in support for CVS, JUnit, and other tasks so you can automate the entire build, deployment, and unit test process.

An Ant buildfile defines targets and dependences between targets. A target is a sequence of programmatic tasks. When Ant is run to make a target, it first makes other targets on which it depends, and then executes the target’s own tasks.

Oracle JDeveloper supports creating and running Ant tasks. Ant buildfiles can be added to or created for projects. Ant buildfiles can be edited with JDeveloper’s XML Source Editor. Ant can be invoked from the user interface to make targets defined in buildfiles.

The buildfile may vary depending on the target application server. For deployment to other application servers, see the application server’s documentation. If your application server does not provide specific Ant tasks, you may be able to use generic Ant tasks. For example, the generic ear task creates an EAR file for you.