JDBC2Schema Task

The jdbc2schema task is defined as follows in the build file:

  <taskdef
    name="torque-jdbc2schema"
    classpathref="ant-classpath"
    classname="org.apache.torque.ant.task.Torque4JDBCTransformTask"/>
    

The jdbc2schema task has the following configuration parameters:

Attributes

Packaging attributes: They define where the generation unit (also known as "templates") is located.

  • packaging: The packaging type of the generation unit, either "directory" or "classpath". Default is "classpath".
  • configDir: The configuration directory of the torque generator. Has no effect if packaging is "classpath".
  • configPackage: The configuration package of the generation unit. Has only effect if packaging is "classpath". Hint: If you use the prefined Torque Templates the package is org.apache.torque.templates.jdbc2schema.
  • projectRootDir: The root directory of the project. Has no effect if packaging is "classpath". Default is ".".

Database attributes:

  • dbDriver: The database driver class.
  • dbUrl: The database URL.
  • dbUser: The database user.
  • dbPassword: database password for user

Target attributes: They define where the target files are created.

  • defaultOutputDir: The target directory for files which are generated each time anew. Default is "./generated-sources".

Other attributes:

  • loglevel: The Loglevel to use in the generation process. Must be one of trace, debug, info, warn or error. If not set, the log level defined in the generation unit is used.