Cayenne User Documentation
Ant Tasks

## Ant tasks

Cayenne ships with Ant tasks that provide Ant frontend to a number of useful operations in Cayenne. The following tasks are included:

- cgen - Java class generator
- cdbgen - Database schema generator
- cdeploy - Deployment configurator
- cdataport - Data porting tool.

### Importing Cayenne Tasks in build.xml

Cayenne tasks above can be imported individually using Ant taskdef, as described in each task documentation page. However the users of Ant 1.6 and newer can take advantage of Antlib Ant feature. Antlib allows 3rd party tasks and types to be defined easily. Cayenne has an embedded antlib.xml descriptor file in the package `org.apache.cayenne.tools`. All of Cayenne's Ant tasks can be defined at once using the following definition in your Ant build file:

    <typedef resource="org/apache/cayenne/tools/antlib.xml">
       <classpath refid="classpath"/>
    </typedef>

When using the Antlib construct, omit the `<taskdef>` elements shown in the examples of each task, as the antlib.xml file defines all of the Cayenne Ant tasks.

### Sections

1. cgen
2. cdbgen
3. cdeploy
4. cdataport

.
Copyright ©2001-2008 Apache Software Foundation