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.
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:
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.