You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by qu...@apache.org on 2003/04/10 21:52:40 UTC

cvs commit: maven-plugins/maven-torque-plugin/xdocs .cvsignore goals.xml index.xml properties.xml

quintonm    2003/04/10 12:52:40

  Added:       maven-torque-plugin .cvsignore plugin.jelly
                        plugin.properties project.properties project.xml
               maven-torque-plugin/xdocs .cvsignore goals.xml index.xml
                        properties.xml
  Log:
  Initial checkin
  
  Revision  Changes    Path
  1.1                  maven-plugins/maven-torque-plugin/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  target
  velocity.log
  maven.log
  
  
  
  1.1                  maven-plugins/maven-torque-plugin/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  <?xml version="1.0"?>
  
  <project xmlns:j="jelly:core">
  
    <!-- ================================================================ -->
    <!-- M A I N  T A R G E T                                             -->
    <!-- ================================================================ -->
    <!-- This default target will run all the targets that generate       -->
    <!-- source. You will probably only run this target once then         -->
    <!-- call individual targets as necessary to update your sources      -->
    <!-- when you change your XML schema.                                 -->
    <!-- ================================================================ -->
    <goal
      name="torque"
      description="Generates SQL files and Peer-based OM objects">
  
      <attainGoal name="torque:sql"/>
      <attainGoal name="torque:om"/>
  
    </goal>
  
    <goal
      name="torque:init"
      description="Build classpath and define tasks">
  
      <!-- Setup the classpath for torque plugins -->
      <path id="torque-classpath">
        <pathelement path="${plugin.getDependencyPath('commons-collections')}"/>
        <pathelement path="${plugin.getDependencyPath('commons-lang')}"/>
        <pathelement path="${plugin.getDependencyPath('log4j')}"/>
        <pathelement path="${plugin.getDependencyPath('velocity')}"/>
        <pathelement path="${plugin.getDependencyPath('village')}"/>
        <pathelement path="${plugin.getDependencyPath('xercesImpl')}"/>
        <pathelement path="${plugin.getDependencyPath('xmlParserAPIs')}"/>
        <pathelement path="${plugin.getDependencyPath('torque-gen')}"/>
      </path>
  
      <!-- The default.properties file will map old properties to the new ones along
           with setting the correct defaults.
  
           Note: I have no idea why this file is not already processed by the plugin..
        -->
      <property file="${maven.home}/plugins/maven-torque-plugin-3.1/plugin.properties"/>
  
      <!-- Define all of the tasks -->
      <taskdef
        name="torque-data-model"
        classpathref="torque-classpath"
        classname="org.apache.torque.task.TorqueDataModelTask"/>
      <taskdef
        name="torque-data-dump"
        classpathref="torque-classpath"
        classname="org.apache.torque.task.TorqueDataDumpTask"/>
      <taskdef
        name="torque-data-sql"
        classpathref="torque-classpath"
        classname="org.apache.torque.task.TorqueDataSQLTask"/>
      <taskdef
        name="torque-doc"
        classpathref="torque-classpath"
        classname="org.apache.torque.task.TorqueDocumentationTask"/>
      <taskdef
        name="torque-jdbc-transform"
        classpathref="torque-classpath"
        classname="org.apache.torque.task.TorqueJDBCTransformTask"/>
      <taskdef
        name="torque-package-to-path"
        classpathref="torque-classpath"
        classname="org.apache.torque.task.PackageAsPathTask"/>
      <taskdef
        name="torque-sql"
        classpathref="torque-classpath"
        classname="org.apache.torque.task.TorqueSQLTask"/>
      <taskdef
        name="torque-sql-exec"
        classpathref="torque-classpath"
        classname="org.apache.torque.task.TorqueSQLExec"/>
      <taskdef
        name="torque-sql-transform"
        classpathref="torque-classpath"
        classname="org.apache.torque.task.TorqueSQLTransformTask"/>
  
    </goal>
  
    <!-- ================================================================ -->
    <!-- G E N E R A T E  P R O J E C T  S Q L                            -->
    <!-- ================================================================ -->
    <!-- Generate the SQL for your project, These are in addition         -->
    <!-- to the base Torque tables! The tables you require for your       -->
    <!-- project should be specified in project-schema.xml.               -->
    <!-- ================================================================ -->
  
    <goal
      name="torque:sql"
      description="generates the SQL for your project"
      prereqs="torque:init, torque:sql-check">
  
      <j:choose>
        <j:when test="${torque.internal.sql.uptodate}">
          <echo>Schema files have not changed since last generation.</echo>
        </j:when>
        <j:otherwise>
          <attainGoal name="torque:sql-generate"/>
        </j:otherwise>
      </j:choose>
  
    </goal>
  
    <goal
      name="torque:sql-check"
      description="Determine if the SQL files need to be generated">
  
      <j:choose>
        <j:when test="${torque.runOnSchemaChange}">
          <uptodate
            property="torque.internal.sql.uptodate"
            targetfile="${torque.sql.dir}/${torque.project}-schema.sql">
            <srcfiles dir="${torque.schema.dir}" includes="**/*-schema.xml" />
          </uptodate>
        </j:when>
        <j:otherwise>
          <j:set var="torque.internal.sql.uptodate" value="false"/>
        </j:otherwise>
      </j:choose>
  
    </goal>
  
    <goal
      name="torque:sql-generate"
      prereqs="torque:init">
  
      <j:choose>
        <j:when test="${torque.useClasspath}">
          <torque-sql
            basePathToDbProps="sql/base/"
            contextProperties="${torque.contextProperties}"
            controlTemplate="${torque.template.sql}"
            idTableXMLFile="${torque.idTableXMLFile}"
            outputDirectory="${torque.sql.dir}"
            outputFile="report.${torque.project}.sql.generation"
            sqldbmap="${torque.sql.dir}/sqldb.map"
            targetDatabase="${torque.database}"
            useClasspath="${torque.useClasspath}">
            <fileset dir="${torque.schema.dir}"
              includes="${torque.schema.sql.includes}"
              excludes="${torque.schema.sql.excludes}"
            />
          </torque-sql>
        </j:when>
        <j:otherwise>
          <torque-sql
            basePathToDbProps="sql/base/"
            contextProperties="${torque.contextProperties}"
            controlTemplate="${torque.template.sql}"
            idTableXMLFile="${torque.idTableXMLFile}"
            outputDirectory="${torque.sql.dir}"
            outputFile="report.${torque.project}.sql.generation"
            sqldbmap="${torque.sql.dir}/sqldb.map"
            targetDatabase="${torque.database}"
            templatePath="${torque.templatePath}">
            <fileset dir="${torque.schema.dir}"
              includes="${torque.schema.sql.includes}"
              excludes="${torque.schema.sql.excludes}"
            />
          </torque-sql>
        </j:otherwise>
      </j:choose>
  
    </goal>
  
    <!-- ================================================================ -->
    <!-- G E N E R A T E  P R O J E C T  P E E R  B A S E D  O M          -->
    <!-- ================================================================ -->
    <!-- Generate the Peer-based object model for your project.           -->
    <!-- These are in addition to the base Torque OM!                     -->
    <!-- ================================================================ -->
  
    <goal
      name="torque:om"
      description="Generate the Peer-based object model from *-schema.xml files"
      prereqs="torque:init, torque:om-check">
  
      <j:choose>
        <j:when test="${torque.internal.om.uptodate}">
          <echo>Schema files have not changed since last generation.</echo>
        </j:when>
        <j:otherwise>
          <attainGoal name="torque:om-generate"/>
        </j:otherwise>
      </j:choose>
  
    </goal>
  
    <goal
      name="torque:om-check"
      prereqs="torque:init">
  
      <j:choose>
        <j:when test="${torque.runOnlyOnSchemaChange}">
          <uptodate
            property="torque.internal.om.uptodate"
            targetfile="${torque.java.dir}/report.${torque.project}.om.generation">
            <srcfiles dir="${torque.schema.dir}" includes="**/*-schema.xml" />
          </uptodate>
        </j:when>
        <j:otherwise>
          <j:set var="torque.internal.om.uptodate" value="false"/>
        </j:otherwise>
      </j:choose>
  
    </goal>
  
    <goal
      name="torque:om-generate"
      prereqs="torque:init">
  
      <j:choose>
        <j:when test="${torque.useClasspath}">
          <torque-data-model
            contextProperties="${torque.contextProperties}"
            controlTemplate="${torque.template.om}"
            outputDirectory="${torque.java.dir}"
            outputFile="report.${torque.project}.om.generation"
            targetDatabase="${torque.database}"
            targetPackage="${torque.targetPackage}"
            useClasspath="${torque.useClasspath}">
            <fileset dir="${torque.schema.dir}"
              includes="${torque.schema.om.includes}"
              excludes="${torque.schema.om.excludes}"
            />
          </torque-data-model>
        </j:when>
        <j:otherwise>
          <torque-data-model
            contextProperties="${torque.contextProperties}"
            controlTemplate="${torque.template.om}"
            outputDirectory="${torque.java.dir}"
            outputFile="report.${torque.project}.om.generation"
            targetDatabase="${torque.database}"
            targetPackage="${torque.targetPackage}"
            templatePath="${torque.templatePath}">
            <fileset dir="${torque.schema.dir}"
              includes="${torque.schema.om.includes}"
              excludes="${torque.schema.om.excludes}"
            />
          </torque-data-model>
        </j:otherwise>
      </j:choose>
  
    </goal>
  
    <!-- ================================================================ -->
    <!-- G E N E R A T E  P R O J E C T  D A T A  D T D                   -->
    <!-- ================================================================ -->
    <!-- Generate the DATA DTD for your project                           -->
    <!-- ================================================================ -->
  
    <goal
      name="torque:datadtd"
      description="Generates the DATA DTD for your project"
      prereqs="torque:init">
  
      <torque-data-model
        contextProperties="${torque.contextProperties}"
        controlTemplate="${torque.template.dataDtd}"
        outputDirectory="${torque.output.dir}"
        outputFile="report.${torque.project}.datadtd.generation"
        templatePath="${torque.templatePath}"
        useClasspath="${torque.useClasspath}"
        xmlFile="${torque.schema.dir}/${torque.project}-schema.xml"
      />
  
    </goal>
  
    <!-- ================================================================ -->
    <!-- Dump data from database into xml file                            -->
    <!-- ================================================================ -->
  
    <goal
      name="torque:datadump"
      description="dump data from database into xml file"
      prereqs="torque:init">
  
      <torque-data-dump
        contextProperties="${torque.contextProperties}"
        controlTemplate="${torque.template.dataDump}"
        databaseDriver="${torque.database.driver}"
        databaseName="${torque.database.name}"
        databaseUrl="${torque.database.url}"
        databaseUser="${torque.database.user}"
        databasePassword="${torque.database.password}"
        outputDirectory="${torque.output.dir}"
        outputFile="report.${torque.project}.datadump.generation"
        templatePath="${torque.templatePath}"
        useClasspath="${torque.useClasspath}"
        xmlFile="${torque.schema.dir}/${torque.project}-schema.xml"
      />
  
    </goal>
  
    <!-- ================================================================ -->
    <!-- Generate SQL from XML data file                                  -->
    <!-- ================================================================ -->
  
    <goal
      name="torque:datasql"
      description="generates sql from data xml"
      prereqs="torque:init">
  
      <torque-data-sql
        contextProperties="${torque.contextProperties}"
        controlTemplate="${torque.template.dataSql}"
        dataDTD="${torque.schema.dir}/${torque.project}-data.dtd"
        dataXmlFile="${torque.schema.dir}/${torque.project}-data.xml"
        outputDirectory="${torque.output.dir}"
        outputFile="${torque.project}-data.sql"
        sqldbmap="${torque.sql.dir}/sqldb.map"
        targetDatabase="${torque.database}"
        templatePath="${torque.templatePath}"
        useClasspath="${torque.useClasspath}"
        xmlFile="${torque.schema.dir}/${torque.project}-schema.xml"
      />
  
    </goal>
  
    <!-- ================================================================ -->
    <!-- C R E A T E  T A R G E T  D A T A B A S E                        -->
    <!-- ================================================================ -->
    <!-- Create the target database by executing a generated script       -->
    <!-- that is capable of performing the task.                          -->
    <!-- ================================================================ -->
  
    <goal
      name="torque:create-db"
      description="generates the target database"
      prereqs="torque:init">
  
      <j:choose>
  
        <j:when test="${torque.database.manualCreation}">
          <echo>
            You have configured torque for manual database creation...
            The create-db.sql script will NOT be executed.
          </echo>
        </j:when>
  
        <j:otherwise>
          <torque-data-model
            controlTemplate="${torque.template.sqlDbInit}"
            outputDirectory="${torque.sql.dir}"
            outputFile="create-db.sql"
            targetDatabase="${torque.database}"
            templatePath="${torque.templatePath}"
            useClasspath="${torque.useClasspath}">
            <fileset dir="${torque.schema.dir}"
              includes="${torque.schema.create-db.includes}"
              excludes="${torque.schema.create-db.excludes}"
            />
          </torque-data-model>
  
          <echo>
            Executing the create-db.sql script ...
          </echo>
  
          <sql
            autocommit="true"
            driver="${torque.database.driver}"
            onerror="continue"
            password="${torque.database.password}"
            src="${torque.sql.dir}/create-db.sql"
            url="${torque.database.createUrl}"
            userid="${torque.database.user}">
            <classpath refid="torque-classpath"/>
          </sql>
        </j:otherwise>
  
      </j:choose>
  
    </goal>
  
    <!-- ================================================================ -->
    <!-- G E N E R A T E   D O C S                                        -->
    <!-- ================================================================ -->
    <!-- Generates documentation to                                       -->
    <!-- ${torque.doc.dir}/project-schema.html                            -->
    <!-- ================================================================ -->
  
    <goal
      name="torque:doc"
      description="Generates documentation for your datamodel"
      prereqs="torque:init">
  
      <torque-doc
        contextProperties="${torque.contextProperties}"
        controlTemplate="${torque.template.doc}"
        outputDirectory="${torque.doc.dir}"
        outputFile="report.${torque.project}.doc.generation"
        outputFormat="${torque.doc.format}"
        sqldbmap="${torque.sql.dir}/sqldb.map"
        templatePath="${torque.templatePath}"
        useClasspath="${torque.useClasspath}">
        <fileset dir="${torque.schema.dir}"
          includes="${torque.schema.doc.includes}"
          excludes="${torque.schema.doc.excludes}"
        />
      </torque-doc>
  
    </goal>
  
    <!-- ================================================================ -->
    <!-- J D B C  TO  X M L                                               -->
    <!-- ================================================================ -->
  
    <goal
      name="torque:jdbc"
      description="jdbc to xml"
      prereqs="torque:init">
  
      <torque-jdbc-transform
        dbDriver="${torque.database.driver}"
        dbPassword="${torque.database.password}"
        dbSchema="${torque.database.schema}"
        dbUrl="${torque.database.url}"
        dbUser="${torque.database.user}"
        outputFile="${torque.schema.dir}/schema.xml"
        sameJavaName="${torque.sameJavaName}"
      />
    </goal>
  
    <!-- ================================================================ -->
    <!-- I N S E R T  S I N G L E  S Q L  F I L E S                       -->
    <!-- ================================================================ -->
  
    <goal
      name="torque:insert-sql"
      description="inserts the generated sql"
      prereqs="torque:init">
  
      <torque-sql-exec
        autocommit="true"
        driver="${torque.database.driver}"
        onerror="continue"
        password="${torque.database.password}"
        sqldbmap="${torque.sql.dir}/sqldb.map"
        srcDir="${torque.sql.dir}"
        url="${torque.database.buildUrl}"
        userid="${torque.database.user}">
        <classpath refid="torque-classpath"/>
      </torque-sql-exec>
  
    </goal>
  
    <!-- ================================================================ -->
    <!-- G E N E R A T E   I D   B R O K E R   I N I T   S Q L            -->
    <!-- ================================================================ -->
  
    <goal
      name="torque:id-table-init-sql"
      description="generates initialization sql for ID Broker"
      prereqs="torque:init">
  
      <torque-sql
        contextProperties="${torque.contextProperties}"
        controlTemplate="${torque.template.idTable}"
        outputDirectory="${torque.sql.dir}"
        outputFile="report.idtable-init.sql.generation"
        sqldbmap="${torque.sql.dir}/sqldb.map"
        suffix="-idtable-init"
        targetDatabase="${torque.database}"
        templatePath="${torque.templatePath}"
        useClasspath="${torque.useClasspath}">
        <fileset dir="${torque.schema.dir}"
          includes="${torque.schema.init-sql.includes}"
          excludes="${torque.schema.init-sql.excludes}"
        />
      </torque-sql>
  
    </goal>
  
    <!-- ================================================================ -->
    <!-- G E N E R A T E  O M  Z I P  F I L E                             -->
    <!-- ================================================================ -->
    <!-- Moves the files out of your source tree and into a zip file.     -->
    <!-- ================================================================ -->
  
    <goal name="torque:check-om-zip"
      prereqs="torque:init">
  
      <condition property="torque.internal.omzip.src.base">
        <equals arg1="${torque.omzip.src.base}" arg2="true"/>
      </condition>
      <condition property="torque.internal.omzip.src.extension">
        <equals arg1="${torque.omzip.src.extension}" arg2="true"/>
      </condition>
      <condition property="torque.internal.omzip.bin.base">
        <equals arg1="${torque.omzip.bin.base}" arg2="true"/>
      </condition>
      <condition property="torque.internal.omzip.bin.extension">
        <equals arg1="${torque.omzip.bin.extension}" arg2="true"/>
      </condition>
      <condition property="torque.internal.omzip.deleteFiles">
        <equals arg1="${torque.omzip.deleteFiles}" arg2="true"/>
      </condition>
  
    </goal>
  
    <goal
      name="torque:om-zip"
      prereqs="check-om-zip"
      description="Moves source om files to separate jar and out of the source tree">
  
      <!-- Perform the package to path converison. -->
      <torque-package-to-path
        name="torque.internal.omzip.packagePath"
        package="${torque.targetPackage}"
      />
  
      <!-- See if the source files need jar'ed. -->
      <j:set var="torque.internal.omzip.type" value="src"/>
      <j:set var="torque.internal.omzip.pattern" value="base"/>
      <j:set var="torque.internal.omzip.files" value="java"/>
      <j:set var="torque.internal.omzip.dir" value="${torque.java.dir}"/>
      <attainGoal name="torque:om-zip-worker"/>
      <j:set var="torque.internal.omzip.pattern" value="extension"/>
      <attainGoal name="torque:om-zip-worker"/>
  
      <!-- See if the class files need jar'ed. -->
      <j:set var="torque.internal.omzip.type" value="bin"/>
      <j:set var="torque.internal.omzip.pattern" value="base"/>
      <j:set var="torque.internal.omzip.files" value="class"/>
      <j:set var="torque.internal.omzip.dir" value="${torque.compile.build.dir}"/>
      <attainGoal name="torque:om-zip-worker"/>
      <j:set var="torque.internal.omzip.pattern" value="extension"/>
      <attainGoal name="torque:om-zip-worker"/>
  
    </goal>
  
    <goal
      name="torque:om-zip-worker">
  
      <j:if test="torque.internal.omzip.${torque.internal.omzip.type}.${torque.internal.omzip.pattern}">
  
        <!-- Base files that typically aren't modified. -->
        <patternset id="torque.internal.omzip.pattern.base">
          <include name="${torque.internal.omzip.packagePath}/${torque.basePrefix}*.${torque.internal.omzip.files}"/>
          <include name="${torque.internal.omzip.packagePath}/map/*MapBuilder.${torque.internal.omzip.files}"/>
        </patternset>
  
        <!-- Extension files that typically are modified. -->
        <patternset id="torque.internal.omzip.pattern.extension">
          <include name="${torque.internal.omzip.packagePath}/*.${torque.internal.omzip.files}"/>
        </patternset>
  
        <jar
          jarfile="${torque.omzip.dir}/${torque.project}-om-${torque.internal.omzip.type}.jar"
          update="true">
          <fileset dir="${torque.internal.omzip.dir}">
            <patternset refid="torque.internal.omzip.pattern.${torque.internal.omzip.pattern}"/>
          </fileset>
        </jar>
  
        <attainGoal name="torque:om-zip-worker-delete"/>
  
      </j:if>
  
    </goal>
  
    <goal
      name="torque:om-zip-worker-delete">
  
      <j:if test="${torque.internal.omzip.deleteFiles}">
  
        <!-- Base files that typically aren't modified. -->
        <patternset id="torque.internal.omzip.pattern.base">
          <include name="${torque.internal.omzip.packagePath}/${torque.basePrefix}*.*"/>
          <include name="${torque.internal.omzip.packagePath}/map/*MapBuilder.*"/>
        </patternset>
        <!-- Extension files that typically are modified. -->
        <patternset id="torque.internal.omzip.pattern.extension">
          <include name="${torque.internal.omzip.packagePath}/*.*"/>
        </patternset>
  
        <delete>
          <fileset dir="${torque.internal.omzip.dir}">
            <patternset refid="torque.internal.omzip.pattern.${torque.internal.omzip.pattern}"/>
          </fileset>
        </delete>
  
      </j:if>
  
    </goal>
  
    <!-- =================================================================== -->
    <!-- S Q L  T O  X M L                                                   -->
    <!-- =================================================================== -->
    <!-- Create an xml schema from an sql schema.                            -->
    <!--                                                                     -->
    <!--  inputFile: The input sql file. This must be valid sql file but     -->
    <!--             it not not be in any specific format.                   -->
    <!-- outputFile: The file where the xml schema will be written           -->
    <!-- =================================================================== -->
  
    <goal
      name="torque:sql2xml"
      description="creates an xml schema from an sql schema"
      prereqs="torque:init">
  
      <torque-sql-transform
        inputFile="${torque.schema.dir}/schema.sql"
        outputFile="${torque.schema.dir}/schema.xml"
      />
  
    </goal>
  
    <!-- =================================================================== -->
    <!-- O J B   S T U F F                                                   -->
    <!-- =================================================================== -->
  
    <goal
      name="torque:ojb"
      description="Generates the repository and om for ojb (experimental)">
  
      <attainGoal name="torque:ojb-repository"/>
      <attainGoal name="torque:ojb-model"/>
  
    </goal>
  
    <goal
      name="torque:ojb-repository"
      description="Generates the repository for ojb (experimental)"
      prereqs="torque:init">
  
      <torque-data-model
        contextProperties="${torque.contextProperties}"
        controlTemplate="${torque.template.ojb}"
        targetDatabase="${torque.database}"
        targetPackage="${torque.targetPackage}"
        outputDirectory="${torque.ojb.dir}"
        outputFile="report.${torque.project}.ojb.generation"
        sqldbmap="${torque.sql.dir}/sqldb.map"
        templatePath="${torque.templatePath}"
        useClasspath="${torque.useClasspath}">
        <fileset dir="${torque.schema.dir}"
          includes="${torque.schema.ojb.includes}"
          excludes="${torque.schema.ojb.excludes}"
        />
      </torque-data-model>
  
    </goal>
  
    <target
      name="torque:ojb-model"
      description="Generates an object model for ojb (experimental)"
      prereqs="torque:init">
  
      <torque-data-model
        contextProperties="${torque.contextProperties}"
        controlTemplate="${torque.template.ojbModel}"
        targetDatabase="${torque.database}"
        targetPackage="${torque.targetPackage}"
        outputDirectory="${torque.ojb.dir}"
        outputFile="report.${torque.project}.ojb.generation"
        sqldbmap="${torque.sql.dir}/sqldb.map"
        templatePath="${torque.templatePath}"
        useClasspath="${torque.useClasspath}">
        <fileset dir="${torque.schema.dir}"
          includes="${torque.schema.ojb.includes}"
          excludes="${torque.schema.ojb.excludes}"
        />
      </torque-data-model>
  
    </target>
  
  
  </project>
  
  
  
  1.1                  maven-plugins/maven-torque-plugin/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  # -------------------------------------------------------------------
  # P L U G I N  P R O P E R T I E S
  # -------------------------------------------------------------------
  # Torque plugin properties
  #
  # DO NOT EDIT THIS FILE - If you need to change the values found
  # in this file, override them in your project.properties or
  # build.properties file.
  # -------------------------------------------------------------------
  
  # -------------------------------------------------------------------
  #
  #  B A S I C   P R O P E R T I E S
  #
  # -------------------------------------------------------------------
  
  project = torque
  # database = postgresql
  targetPackage = org.apache.torque
  
  torque.project = ${project}
  torque.database = ${database}
  torque.targetPackage = ${targetPackage}
  torque.runOnlyOnSchemaChange = true
  
  # -------------------------------------------------------------------
  #
  #  D I R E C T O R I E S
  #
  # -------------------------------------------------------------------
  
  outputDirectory = ${maven.build.dest}
  schemaDirectory = ${maven.src.dir}/schema
  templatePath = ${maven.src.dir}/torqueTemplates
  
  torque.output.dir = ${outputDirectory}
  torque.schema.dir = ${schemaDirectory}
  torque.templatePath = ${templatePath}
  
  torque.doc.dir = ${torque.output.dir}/doc/schema
  torque.java.dir = ${maven.src.dir}/java
  torque.ojb.dir = ${maven.src.dir}/ojb
  torque.sql.dir = ${torque.output.dir}/sql
  torque.omzip.dir = ${torque.output.dir}
  
  
  # -------------------------------------------------------------------
  #
  #  D A T A B A S E   S E T T I N G S
  #
  # -------------------------------------------------------------------
  
  # createDatabaseUrl = jdbc:postgresql://127.0.0.1:5432/template1
  # buildDatabaseUrl = jdbc:postgresql://127.0.0.1:5432/bookstore
  # databaseUrl = jdbc:postgresql://127.0.0.1:5432/bookstore
  # databaseDriver = org.postgresql.Driver
  # databaseUser = jvanzyl
  # databasePassword =
  # databaseHost = 127.0.0.1
  
  # databaseSchema =
  # databaseName =
  database.manual.creation = false
  sameJavaName = false
  
  torque.database.createUrl = ${createDatabaseUrl}
  torque.database.buildUrl = ${buildDatabaseUrl}
  torque.database.url = ${databaseUrl}
  torque.database.driver = ${databaseDriver}
  torque.database.user = ${databaseUser}
  torque.database.password = ${databasePassword}
  torque.database.host = ${databaseHost}
  
  torque.database.schema = ${databaseSchema}
  torque.database.name = ${databaseName}
  torque.database.manualCreation = ${database.manual.creation}
  torque.saveJavaName = ${sameJavaName}
  
  
  # -------------------------------------------------------------------
  #
  #  T E M P L A T E   V A R I A B L E S
  #
  # -------------------------------------------------------------------
  
  addGetByNameMethod = true
  addIntakeRetrievable = false
  addSaveMethod = true
  addTimeStamp = true
  basePrefix = Base
  complexObjectModel = true
  useManagers = false
  useClasspath = true
  
  torque.addGetByNameMethod = ${addGetByNameMethod}
  torque.addIntakeRetrievable = ${addIntakeRetrievable}
  torque.retrievableInterface = org.apache.turbine.om.Retrievable
  torque.addSaveMethod = ${addSaveMethod}
  torque.addTimeStamp = ${addTimeStamp}
  torque.basePrefix = ${basePrefix}
  torque.complexObjectModel = ${complexObjectModel}
  torque.saveException = Exception
  torque.useClasspath = ${useClasspath}
  torque.useManagers = ${useManagers}
  
  torque.omzip.src.base = false
  torque.omzip.src.extension = false
  torque.omzip.bin.base = false
  torque.omzip.bin.extension = false
  torque.omzip.deleteFiles = false
  
  torque.generateDeprecated = true
  
  # -------------------------------------------------------------------
  #
  #  M I S C .   S E T T I N G S
  #
  # -------------------------------------------------------------------
  
  idTableXMLFile =
  documentationFormat = html
  initialID = 101
  
  torque.idTableXMLFile = ${idTableXMLFile}
  torque.doc.format = ${documentationFormat}
  torque.doc.html.normalFont = font-family: Verdana; font-size: 10pt;
  torque.doc.html.fkColor = afe295
  torque.initialID = ${initialID}
  
  
  # -------------------------------------------------------------------
  #
  #  C O N T R O L   T E M P L A T E S
  #
  # -------------------------------------------------------------------
  
  SQLControlTemplate = sql/base/Control.vm
  OMControlTemplate = om/Control.vm
  idTableControlTemplate = sql/id-table/Control.vm
  DataDTDControlTemplate = data/Control.vm
  DataDumpControlTemplate = data/dump/Control.vm
  DataSQLControlTemplate = sql/load/Control.vm
  DocControlTemplate = doc/Control.vm
  
  torque.template.sql = ${SQLControlTemplate}
  torque.template.om = ${OMControlTemplate}
  torque.template.idTable = ${idTableControlTemplate}
  torque.template.dataDtd = ${DataDTDControlTemplate}
  torque.template.dataDump = ${DataDumpControlTemplate}
  torque.template.dataSql = ${DataSQLControlTemplate}
  torque.template.doc = ${DocControlTemplate}
  torque.template.sqlDbInit = sql/db-init/Control.vm
  torque.template.ojb = ojb/repository/Control.vm
  torque.template.ojbModel = ojb/model/Control.vm
  
  
  # -------------------------------------------------------------------
  #
  #  C O M P I L E   S E T T I N G S
  #
  # -------------------------------------------------------------------
  
  src.dir = ${torque.java.dir}
  build.dest = bin/classes
  debug = on
  deprecation = off
  optimize = off
  
  torque.compile.src.dir = ${src.dir}
  torque.compile.build.dir = ${build.dest}
  torque.compile.debug = ${debug}
  torque.compile.deprecation = ${deprecation}
  torque.compile.optimize = ${optimize}
  
  
  # -------------------------------------------------------------------
  #
  #  I N C L U D E   A N D   E X C L U D E   S E T T I N G S
  #
  # -------------------------------------------------------------------
  
  torque.schema.sql.includes = *-schema.xml
  torque.schema.sql.excludes =
  torque.schema.doc.includes = *-schema.xml
  torque.schema.doc.excludes =
  torque.schema.create-db.includes = *-schema.xml
  torque.schema.create-db.excludes =
  torque.schema.init-sql.includes = *-schema.xml
  torque.schema.init-sql.excludes = id-table-schema.xml
  torque.schema.om.includes = *-schema.xml
  torque.schema.om.excludes = id-table-schema.xml
  torque.schema.ojb.includes = *-schema.xml
  torque.schema.ojb.excludes =
  
  
  
  1.1                  maven-plugins/maven-torque-plugin/project.properties
  
  Index: project.properties
  ===================================================================
  # -------------------------------------------------------------------
  # P R O J E C T  P R O P E R T I E S
  # -------------------------------------------------------------------
  maven.xdoc.date=left
  maven.xdoc.version=${pom.currentVersion}
  
  
  
  
  1.1                  maven-plugins/maven-torque-plugin/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
    <extend>${basedir}/../project.xml</extend>
    <pomVersion>3</pomVersion>
    <id>maven-torque-plugin</id>
    <name>Maven Torque Plug-in</name>
    <currentVersion>3.1</currentVersion>
    <description>Maven Plugin for Torque</description>
    <shortDescription>Maven Plugin for Torque</shortDescription>
    <url>http://maven.apache.org/reference/plugins/torque/</url>
    <siteDirectory>/www/maven.apache.org/reference/plugins/torque/</siteDirectory>
    <repository>
      <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven/src/plugins-build/torque/</connection>
      <url>http://cvs.apache.org/viewcvs/maven/src/plugins-build/torque/</url>
    </repository>
    <mailingLists>
      <mailingList>
        <name>Torque User List</name>
        <subscribe>turbine-torque-user-subscribe@jakarta.apache.org</subscribe>
        <unsubscribe>turbine-torque-user-unsubscribe@jakarta.apache.org</unsubscribe>
        <archive>http://archives.apache.org/eyebrowse/SummarizeList?listName=turbine-torque-user@jakarta.apache.org</archive>
      </mailingList>
      <mailingList>
        <name>Torque Developer List</name>
        <subscribe>turbine-torque-dev-subscribe@jakarta.apache.org</subscribe>
        <unsubscribe>turbine-torque-dev-unsubscribe@jakarta.apache.org</unsubscribe>
        <archive>http://archives.apache.org/eyebrowse/SummarizeList?listName=turbine-torque-dev@jakarta.apache.org</archive>
      </mailingList>
    </mailingLists>
    <developers>
      <developer>
        <name>Martin Poeschl</name>
        <id>mpoeschl</id>
        <email>mpoeschl@marmot.at</email>
        <organization>Tucana.at</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Stephen Haberman</name>
        <id>stephenh</id>
        <email>stephenh@chase3000.com</email>
        <organization/>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
      <developer>
        <name>Quinton McCombs</name>
        <id>quintonm</id>
        <email>quintonm@bellsouth.net</email>
        <organization>NequalsOne</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
      </developer>
    </developers>
    <contributors>
      <contributor>
        <name>Markus M. May</name>
        <email>mmay@javafreedom.org</email>
      </contributor>
    </contributors>
    <dependencies>
      <dependency>
        <id>commons-collections</id>
        <version>2.1</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      <dependency>
        <id>commons-configuration</id>
        <version>20030311.152757</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      <dependency>
        <id>commons-dbcp</id>
        <version>1.1-dev.20021231.055112</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      <dependency>
        <id>commons-lang</id>
        <version>1.0.1</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      <dependency>
        <id>log4j</id>
        <version>1.2.7</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      <dependency>
        <id>stratum</id>
        <version>1.0-b3</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      <dependency>
        <groupId>torque</groupId>
        <artifactId>torque-gen</artifactId>
        <version>20030327.070220</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      <dependency>
        <id>velocity</id>
        <version>1.3</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      <dependency>
        <id>village</id>
        <version>2.0-dev-20021111</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      <dependency>
        <id>xerces:xercesImpl</id>
        <version>2.0.2</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      <dependency>
        <id>xerces:xmlParserAPIs</id>
        <version>2.0.2</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
    </dependencies>
  </project>
  
  
  
  1.1                  maven-plugins/maven-torque-plugin/xdocs/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  stylesheets
  
  
  
  1.1                  maven-plugins/maven-torque-plugin/xdocs/goals.xml
  
  Index: goals.xml
  ===================================================================
  <?xml version="1.0"?>
  <document>
  
    <properties>
      <title>Maven Torque Plugin</title>
      <author email="quintonm@bellsouth.net">Quinton McCombs</author>
    </properties>
  
    <body>
      <section name="Goals">
        <table>
        	<tr>
        	  <td>Goal</td>
        	  <td>Description</td>
        	</tr>
        	
        	<tr>
        	  <td>torque</td>
        	  <td>
        	    Calls the torque:sql and torque:om goals
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:sql</td>
        	  <td>
        	    Generates the SQL for your project
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:om</td>
        	  <td>
        	    Generate the Peer-based object model from *-schema.xml files
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:datadtd</td>
        	  <td>
        	    Generates the DATA DTD for your project
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:datadump</td>
        	  <td>
        	    Dump data from database into xml file
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:datasql</td>
        	  <td>
        	    Generates sql from data xml  
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:create-db</td>
        	  <td>
        	    Creates your database from you XML schema file.  Warning:  This 
        	    goal will drop all tables and recreate them.  Any existing data
        	    will be lost!
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:doc</td>
        	  <td>
        	    Generates an HTML document from your XMl schema file.
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:jdbc</td>
        	  <td>
        	    Creates an XML schema file by reverse engineering your database.
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:insert-sql</td>
        	  <td>
        	    Inserts the generated sql
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:id-table-init-sql</td>
        	  <td>
        	    Generates initialization sql for ID Broker
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:om-zip</td>
        	  <td>
        	    Moves source om files to separate jar and out of 
        	    the source tree
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:sql2xml</td>
        	  <td>
        	    Create an xml schema from an sql schema
        	  </td>
        	</tr>
        	<tr>
        	  <td>torque:ojb</td>
        	  <td>
        	    Generates the repository and om for ojb (experimental)
        	  </td>
        	</tr>
        </table>
        
      </section>
   </body>
  </document>
  
  
  
  1.1                  maven-plugins/maven-torque-plugin/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  <document>
  
    <properties>
      <title>Maven Torque Plugin</title>
      <author email="stephenh@chase3000.com">Stephen Haberman</author>
      <author email="quintonm@bellsouth.net">Quinton McCombs</author>
    </properties>
  
    <body>
      <section name="Maven Torque Plugin">
        <p>
          This plugin provides easy intergration with 
          <a href="http://db.apache.org/torque/">Torque</a> for your project.  This replaces using
          the build-torque.xml ant script that previously provided the same
          functionality.
        </p>
        <p>
        	By default, the templates used for code generation are found in
        	the torque-gen jar file.  You can override this behavior by
        	setting the appropriate <a href="properties.html">property</a>.
        </p>
        <p>
          For more information on the functionality provided by this plugin
          see the <a href="goals.html">Goals</a> document.  The various 
          properties used to configure the plugin are documented in the
          <a href="properties.html">Properties</a> document.
        </p>
      </section>
   </body>
  </document>
  
  
  
  1.1                  maven-plugins/maven-torque-plugin/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <document>
    <properties>
      <title>Maven Torque Plugin</title>
      <author email="stephenh@chase3000.com">Stephen Haberman</author>
      <author email="quintonm@bellsouth.net">Quinton McCombs</author>
    </properties>
  
    <body>
      <section name="Plugin Settings">
        <p>
          All of the settings used by the plugin are documented in the 
          <a href="http://db.apache.org/torque/properties-reference.html">Properties Reference</a>
          for Torque.
        </p>
        <p>
          You can also view the default settings for each of the properties
          by looking at plugin.properties in your
          MAVEN_HOME/plugins/maven-torque-plugin directory.  <b>Do not modify
          this file!</b>  All settings can be overridden in you project.properties
          or build.properties file.
        </p>
      </section>
    </body>
  </document>
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org