Ant Tasks has been edited by Andrus Adamchik (Jun 28, 2009).

(View changes)

Content:

Ant tasks

Cayenne ships with Ant tasks that provide Ant frontend to a number of useful operations in Cayenne. These tasks are part of the cayenne-tools JAR, which must be available on the ant classpath. The following tasks are included:

  • cgen - Java class generator
  • cdbgen - Database schema generator
  • cdeploy - Deployment configurator (deprecated; will be removed after 3.0)
  • cdataport - Data porting tool.
  • cdbimport - Database schema importer.

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>

Sections

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

Reply via email to