<?xml version="1.0"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-->

<document>
 <properties>
  <title>Torque Ant Tasks - JDBC2Schema Task</title>
 </properties>

 <body>
  <section name="JDBC2Schema Task">
    <p>
      The jdbc2schema task is defined as follows in the build file:
    </p>
    <source><![CDATA[
  <taskdef
    name="torque-jdbc2schema"
    classpathref="ant-classpath"
    classname="org.apache.torque.ant.task.Torque4JDBCTransformTask"/>
    ]]></source>
    <p>
      The jdbc2schema task has the following configuration parameters:
    </p>
    <subsection name="Attributes">
      <p>
        Packaging attributes: They define where the generation unit
        (also known as "templates") is located.
      </p>
      <ul>
        <li>
          packaging: The packaging type of the generation unit,
          either "directory" or "classpath". Default is "classpath".
        </li>
        <li>
          configDir: The configuration directory of the torque generator.
          Has no effect if packaging is "classpath".
        </li>
        <li>
          configPackage: The configuration package of the generation unit.
          Has only effect if packaging is "classpath".
          
          <i>Hint</i>: If you use the prefined Torque Templates the package is
          <code>org.apache.torque.templates.jdbc2schema</code>.
        </li>
        <li>
          projectRootDir: The root directory of the project.
          Has no effect if packaging is "classpath".
          Default is ".".
        </li>
      </ul>
      <p>
        Database attributes: 
      </p>
      <ul>
        <li>
          dbDriver: The database driver class.
        </li>
        <li>
          dbUrl: The database URL.
        </li>
        <li>
          dbUser: The database user.
        </li>
        <li>
        dbPassword: database password for user
        </li>
      </ul>
      <p>
        Target attributes: They define where the target files are created.
      </p>
      <ul>
        <li>
          defaultOutputDir: The target directory for files
          which are generated each time anew.
          Default is "./generated-sources".
        </li>
      </ul>
      <p>
        Other attributes:
      </p>
      <ul>
        <li>
          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.
        </li>
      </ul>
    </subsection>
   </section>
 </body>
</document>
