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

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 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"/> 

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.


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