Author: ronvoe122
Date: 2007-03-28 08:36:57-0700
New Revision: 10433
Added:
trunk/www/repository/commons-lang/jars/commons-lang-2.1.jar (contents, props changed)
trunk/www/repository/torque/jars/torque-3.3-RC2.jar (contents, props changed)
trunk/www/repository/torque/jars/torque-gen-3.3-RC2.jar (contents, props changed)
trunk/www/repository/torque/jars/torque-gen-templates-3.3-RC2.jar (contents, props changed)
Removed:
trunk/src/conf/conf/runtime-torque.xml
trunk/src/conf/torque.customized.props.tmpl
trunk/www/repository/commons-lang/jars/commons-lang-2.0.jar
trunk/www/repository/torque/jars/torque-3.2.jar
trunk/www/repository/torque/jars/torque-gen-3.2.jar
trunk/www/repository/torque/jars/torque-gen-templates-3.2.jar
trunk/www/repository/torque/plugins/maven-torque-plugin-3.1.1.jar
trunk/www/repository/torque/plugins/maven-torque-plugin-3.2-rc2.jar
Modified:
trunk/build/build.xml
trunk/maven.xml
trunk/project.properties
trunk/project.xml
trunk/src/conf/conf/Torque.properties
trunk/src/conf/conf/build-torque.xml
trunk/src/conf/conf/build.xml
trunk/src/conf/torque.static.props
trunk/src/java/org/tigris/scarab/components/TorqueComponent.java
trunk/src/java/org/tigris/scarab/om/AttributePeer.java
trunk/src/java/org/tigris/scarab/om/IssueTemplateInfoPeer.java
trunk/src/java/org/tigris/scarab/om/QueryPeer.java
trunk/src/java/org/tigris/scarab/om/ScarabModule.java
trunk/src/java/org/tigris/scarab/services/cache/ScarabCacheKey.java
trunk/xdocs/scarab_properties.xml
Log:
Update to torque-3.3-RC2
- cleaned up the build steps concerning Torque:
- maven now calls the ant target to create the om-classes
instead of using the maven-torque-plugin
- removed the maven-torque-plugin, because it's not used anymore
- removed torque-related properties from project.properties,
because they are already maintained in torque.static.props
- kept only that properties in torque.static.props
which were different from their default value
- switched build-torque.xml to the original version delivered with torque
- removed the workarounds for the Bug in the Torque method result cache (TORQUE-63)
- adjusted TorqueComponent.java
Modified: trunk/build/build.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/build/build.xml?view=diff&rev=10433&p1=trunk/build/build.xml&p2=trunk/build/build.xml&r1=10432&r2=10433
==============================================================================
--- trunk/build/build.xml (original)
+++ trunk/build/build.xml 2007-03-28 08:36:57-0700
@@ -388,25 +388,21 @@
<antcall target="torque-copy-scarab-schema" />
- <!-- copy the scarab specific build.properties over -->
- <filter token="DATABASE_TYPE" value="${scarab.database.type}"/>
- <copy file="${src.conf.dir}/torque.static.props"
- tofile="${torque.dir.scarab}/build.static.properties"
- filtering="true" overwrite="true"/>
-
<copy file="${src.conf.dir}/conf/build-torque.xml"
tofile="build-torque.xml"
filtering="true" overwrite="true"/>
<echo>Now call the Torque Generator</echo>
<ant antfile="build-torque.xml" target="om" inheritAll="false">
- <property name="torque.contextProperties" value="${torque.dir.scarab}/build.static.properties"/>
- <property name="torque.dir" value="../target/torque"/>
+ <property name="lib.dir" value="${repository.dir}"/>
+ <property name="torque.schema.dir" value="${torque.dir.scarab}/schema"/>
+ <property name="torque.java.dir" value="${src.java.dir.scarab}"/>
+ <property name="torque.contextProperties" value="${src.conf.dir}/torque.static.props"/>
+ <property name="torque.database" value="${scarab.database.type}"/>
<property name="torque.database.driver" value="${scarab.database.jdbc.driver}"/>
<property name="torque.database.url" value="${scarab.database.url}"/>
<property name="torque.database.user" value="${scarab.database.admin.username}"/>
<property name="torque.database.password" value="${scarab.database.admin.password}"/>
- <property name="torque.saveException" value="${torque.saveException}"/>
</ant>
</target>
@@ -641,8 +637,8 @@
<target name="remove-generation">
<delete file="${src.sql.dir}/report.scarab.sql.generation"/>
<delete file="${src.java.dir.scarab}/report.scarab.om.generation"/>
+ <delete file="${src.java.dir.scarab}/report.scarab.om.base.generation"/>
<delete file="${src.dir}/report.scarab.datadtd.generation"/>
- <!-- delete file="${torque.dir.scarab}/report.scarab.om.generation"/-->
</target>
</project>
Modified: trunk/maven.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/maven.xml?view=diff&rev=10433&p1=trunk/maven.xml&p2=trunk/maven.xml&r1=10432&r2=10433
==============================================================================
--- trunk/maven.xml (original)
+++ trunk/maven.xml 2007-03-28 08:36:57-0700
@@ -44,10 +44,6 @@
target="create-db"
inheritAll="false"
dir="${runtime.config.dir}">
- <property name="torque.database.driver" value="${scarab.database.jdbc.driver}"/>
- <property name="torque.database.url" value="${scarab.database.url}"/>
- <property name="torque.database.user" value="${scarab.database.username}"/>
- <property name="torque.database.password" value="${scarab.database.password}"/>
</ant:ant>
</goal>
@@ -392,13 +388,11 @@
</preGoal>
<preGoal name="java:compile">
- <ant:echo>
-torque.java.dir=${root.dir}/src/java
-torque.schema.dir=${root.dir}/src/schema
-torque.javadoc.dir=${torque.output.dir}/javadoc
-torque.sql.dir=${torque.output.dir}/sql
- </ant:echo>
- <attainGoal name="torque:om"/>
+ <ant:ant antfile="build.xml"
+ target="generate-om"
+ inheritAll="false"
+ dir="${root.dir}/build">
+ </ant:ant>
</preGoal>
<preGoal name="test:test-resources">
Modified: trunk/project.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/project.properties?view=diff&rev=10433&p1=trunk/project.properties&p2=trunk/project.properties&r1=10432&r2=10433
==============================================================================
--- trunk/project.properties (original)
+++ trunk/project.properties 2007-03-28 08:36:57-0700
@@ -1279,72 +1279,6 @@
#######################################################################
-# Section: TORQUE
-########################################################################
-
-torque.project=scarab
-torque.database=${scarab.database.type}
-torque.database.type=${torque.database}
-torque.database.user=${scarab.database.username}
-torque.database.password=${scarab.database.password}
-torque.database.createUrl=${scarab.database.admin.url}
-torque.database.buildUrl=${scarab.database.url}
-torque.database.driver=${scarab.database.jdbc.driver}
-torque.doc.format=anakia
-torque.targetPackage=org.tigris.scarab.om
-torque.schema.om.includes=${torque.project}-schema.xml
-torque.schema.om.excludes=
-torque.retrievableInterface=org.apache.fulcrum.intake.Retrievable
-torque.addGetByNameMethod=true
-torque.addTimeStamp=false
-torque.addIntakeRetrievable=true
-torque.overloadKeySetters=true
-torque.useManagers=true
-
-# ----------------------------
-# torque.runOnlyOnSchemaChange
-# ----------------------------
-#
-#
-# standard torque properties
-#
-
-torque.runOnlyOnSchemaChange=true
-torque.generateDeprecated=true
-torque.output.dir=${root.dir}/target
-torque.template.path=templates
-torque.doc.dir=${maven.gen.docs}/databases
-
-# ---------------
-# torque.java.dir
-# ---------------
-#
-#
-# torque.java.dir=${torque.output.dir}/java
-#
-
-torque.java.dir=${root.dir}/src/java
-torque.schema.dir=${root.dir}/src/schema
-torque.javadoc.dir=${torque.output.dir}/javadoc
-torque.sql.dir=${torque.output.dir}/sql
-torque.basePrefix=Base
-torque.useClasspath=true
-torque.initialId=1000
-torque.addSaveMethod=true
-torque.addGetByNameMethod=true
-torque.complexObjectModel=true
-torque.saveException=TorqueException
-torque.schema.sql.includes=*-schema.xml
-torque.schema.sql.excludes=
-torque.schema.doc.includes=*-schema.xml
-torque.schema.doc.excludes=
-torque.schema.createdb.includes=*-schema.xml
-torque.schema.createdb.excludes=
-torque.schema.initsql.includes=*-schema.xml
-torque.schema.initsql.excludes=id-table-schema.xml
-
-
-#######################################################################
# Section: MIGRATION
########################################################################
# These are some default values that are required for
Modified: trunk/project.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/project.xml?view=diff&rev=10433&p1=trunk/project.xml&p2=trunk/project.xml&r1=10432&r2=10433
==============================================================================
--- trunk/project.xml (original)
+++ trunk/project.xml 2007-03-28 08:36:57-0700
@@ -282,7 +282,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.0</version>
+ <version>2.1</version>
<type>jar</type>
<properties>
<war.bundle>true</war.bundle>
@@ -483,7 +483,7 @@
<!-- Added by HD to make the ant-build happy -->
<groupId>torque</groupId>
<artifactId>torque-gen</artifactId>
- <version>3.2</version>
+ <version>3.3-RC2</version>
<type>jar</type>
<properties>
<war.bundle>true</war.bundle>
@@ -492,7 +492,7 @@
<dependency>
<groupId>torque</groupId>
<artifactId>torque</artifactId>
- <version>3.2</version>
+ <version>3.3-RC2</version>
<type>jar</type>
<properties>
<war.bundle>true</war.bundle>
@@ -501,7 +501,7 @@
<dependency>
<groupId>torque</groupId>
<artifactId>torque-gen-templates</artifactId>
- <version>3.2</version>
+ <version>3.3-RC2</version>
<type>jar</type>
<properties>
<war.bundle>true</war.bundle>
@@ -781,14 +781,6 @@
</dependency>
<!-- End Database Dependencies -->
-
- <dependency>
- <groupId>torque</groupId>
- <artifactId>maven-torque-plugin</artifactId>
- <version>3.2-rc2</version>
- <url>http://db.apache.org/torque/</url>
- <type>plugin</type>
- </dependency>
<dependency>
<groupId>maven-plugins</groupId>
Modified: trunk/src/conf/conf/Torque.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/conf/Torque.properties?view=diff&rev=10433&p1=trunk/src/conf/conf/Torque.properties&p2=trunk/src/conf/conf/Torque.properties&r1=10432&r2=10433
==============================================================================
--- trunk/src/conf/conf/Torque.properties (original)
+++ trunk/src/conf/conf/Torque.properties 2007-03-28 08:36:57-0700
@@ -48,18 +48,9 @@
# -------------------------------------------------------------------
torque.database.default=scarab
-torque.database.scarab.adapter=mysql
-
torque.dsfactory.scarab.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque.dsfactory.scarab.pool.validationQuery=SELECT 1
torque.dsfactory.scarab.pool.maxWait=30000
-torque.dsfactory.scarab.connection.driver=org.gjt.mm.mysql.Driver
-torque.dsfactory.scarab.connection.url=jdbc:mysql://localhost:3306/scarab?
-torque.dsfactory.scarab.connection.user=sa
-torque.dsfactory.scarab.connection.password=
-
-
-
# Determines if the quantity column of the IDBroker's id_table should
# be increased automatically if requests for ids reaches a high
Modified: trunk/src/conf/conf/build-torque.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/conf/build-torque.xml?view=diff&rev=10433&p1=trunk/src/conf/conf/build-torque.xml&p2=trunk/src/conf/conf/build-torque.xml&r1=10432&r2=10433
==============================================================================
--- trunk/src/conf/conf/build-torque.xml (original)
+++ trunk/src/conf/conf/build-torque.xml 2007-03-28 08:36:57-0700
@@ -1,46 +1,100 @@
-<project name="Torque" default="main">
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<project name="Torque" default="main" basedir=".">
<!--
Note - You should not have to edit this file.
- When calling build-torque.xml directly, edit the pository.dir
- that is in the $SCARAB_HOME directory to adjust the properties.
+ Instead, if calling build-torque.xml directly, edit the build.properties
+ that is in the same directory. If calling build-torque.xml via another
+ build file, you can also use the build.properties in the same directory,
+ or set the property torque.contextProperties to the file
+ to use in place of build.properties (e.g. project.properties).
-->
- <property name="torque.contextProperties" value="build.properties"/>
- <property name="torque.dir" value="../../database/instance"/>
-
- <property name="src.dir" value="../src/java"/>
-
- <property name="torque.sql.dir" value="${torque.dir}/sql"/>
- <property name="torque.schema.dir" value="${torque.dir}/schema"/>
-
- <property file="${torque.contextProperties}" />
- <property file="custom.properties" />
- <property file="defaultCustom.properties" />
-
-
- <property name="databaseSchema" value="default"/>
- <property name="databaseUser" value="${scarab.database.user}"/>
- <property name="databaseName" value="${scarab.database.name}"/>
- <property name="databaseHost" value="${scarab.database.host}"/>
+ <!--
+ For us to load the default.properties from the classpath, we need to bootstrap.
+ To know the right lib.dir for the torque-classpath, we need to manually
+ figure out torque.lib.dir, but to do that, we need to manually figure
+ out torque.contextProperties and load that so that any old configurations
+ still work propertly. Then we can go on and do the rest of the mappings via
+ old.properties.
+ -->
+ <property name="build.properties" value="build.properties"/>
+ <property name="torque.contextProperties" value="${build.properties}"/>
+ <property file="${torque.contextProperties}"/>
+ <property name="lib.dir" value="lib"/>
+ <property name="torque.lib.dir" value="${lib.dir}"/>
+ <property name="torque.jar" value="torque-gen-3.3-RC2.jar"/>
<!--
- Build the classpath. Specifically point to each file we're including to avoid
- version conflicts in the case of the torque.lib.dir being something like lib.repo.
- However, we still need to pull in the user's database driver and since we don't
- know which jar that will be, after we've got all of our specific, version-safe jars,
- do a general inclusion of the torque.lib.dir to catch any drivers.
+ Build the classpath used by all torque ant tasks.
+
+ First, defines the template/generator override directories/jars based on the
+ torque.override.dir build property. If this property is not set, use
+ the torque.lib.dir as a default to keep ant happy.
+
+ Note: To prevent version conflicts in the default case, jars being
+ overridden need to end in "override.jar".
+
+ Next, specifically point to each file we're including to avoid version
+ conflicts in the case of the torque.lib.dir being something like lib.repo.
+ However, we still need to pull in the user's database driver and since we
+ don't know which jar that will be, after we've got all of our specific,
+ version-safe jars, do a general inclusion of the torque.lib.dir to catch
+ any drivers. In the maven-built versions, ${torque.jar} is in the working
+ directory.
-->
- <property name="repository.dir" value="../www/repository"/>
- <property name="lib.dir" value="../lib"/>
+ <!-- customized for scarab!:
+ commented out the condition elements,
+ because they are not supported by the ant version
+ which is built into maven 1.02
+
+ <condition property="valid.override.directory"
+ value="${torque.override.dir}">
+ <isset property="torque.override.dir" />
+ </condition>
+ <condition property="valid.override.directory"
+ value="${torque.lib.dir}">
+ <not>
+ <isset property="torque.override.dir" />
+ </not>
+ </condition>
+ -->
+ <property name="valid.override.directory" value="${torque.lib.dir}"/>
<path id="torque-classpath">
- <fileset dir="${repository.dir}">
- <include name="*/jars/*.jar"/>
+ <pathelement location="${valid.override.directory}/templates"/>
+ <fileset dir="${valid.override.directory}">
+ <include name="*override.jar"/>
</fileset>
- <fileset dir="${lib.dir}">
- <include name="**.jar"/>
+ <pathelement path="${torque.jar}" />
+ <fileset dir="${torque.lib.dir}">
+ <include name="**/commons-collections-3.1.jar"/>
+ <include name="**/commons-lang-2.1.jar"/>
+ <include name="**/commons-logging-1.0.4.jar"/>
+ <include name="**/velocity-1.3.1.jar"/>
+ <include name="**/village-2.0.jar"/>
+ <include name="**/xercesImpl-2.6.2.jar"/>
+ <include name="**/xml-apis-2.0.2.jar"/>
+ <include name="**/*.jar"/>
</fileset>
</path>
@@ -106,7 +160,9 @@
<target
name="main"
- description="==> generates om classes">
+ description="==> generates sql + om classes">
+
+ <antcall target="sql"/>
<antcall target="om"/>
</target>
@@ -118,7 +174,6 @@
<!-- ================================================================ -->
<target name="check-use-classpath">
- <echo>running check-use-classpath</echo>
<condition property="torque.internal.useClasspath">
<equals arg1="${torque.useClasspath}" arg2="true"/>
</condition>
@@ -137,7 +192,322 @@
</condition>
</target>
+ <!-- ================================================================ -->
+ <!-- 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. -->
+ <!-- ================================================================ -->
+
+ <target
+ name="sql-check"
+ depends="check-run-only-on-schema-change"
+ if="torque.internal.runOnlyOnSchemaChange">
+ <uptodate
+ property="torque.internal.sql.uptodate"
+ targetfile="${torque.sql.dir}/${torque.project}-schema.sql">
+ <srcfiles dir="${torque.schema.dir}" includes="**/*-schema.xml" />
+ </uptodate>
+ </target>
+
+ <target
+ name="sql"
+ depends="check-use-classpath, sql-check"
+ unless="torque.internal.sql.uptodate"
+ description="==> generates the SQL for your project">
+ <echo message="+------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Generating SQL for YOUR Torque project! |"/>
+ <echo message="| |"/>
+ <echo message="+------------------------------------------+"/>
+
+ <antcall target="sql-classpath"/>
+ <antcall target="sql-template"/>
+ </target>
+
+ <target name="sql-classpath" if="torque.internal.useClasspath">
+ <echo message="loading templates from classpath"/>
+ <torque-sql
+ 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>
+ </target>
+
+ <target name="sql-template" unless="torque.internal.useClasspath">
+ <echo message="loading templates from ${torque.templatePath}"/>
+ <torque-sql
+ 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>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- G E N E R A T E D O C S -->
+ <!-- ================================================================ -->
+ <!-- Generates documentation to -->
+ <!-- ${torque.doc.dir}/project-schema.html -->
+ <!-- ================================================================ -->
+
+
+ <target
+ name="doc"
+ description="==> generates documentation for your datamodel">
+
+ <echo message="+------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Generating docs for YOUR datamodel! |"/>
+ <echo message="| |"/>
+ <echo message="+------------------------------------------+"/>
+
+ <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>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- 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. -->
+ <!-- ================================================================ -->
+
+ <target name="create-db-check">
+ <condition property="torque.internal.manualCreation">
+ <equals arg1="${torque.database.manualCreation}" arg2="true"/>
+ </condition>
+ </target>
+
+ <target
+ name="create-db"
+ unless="torque.internal.manualCreation"
+ depends="create-db-check"
+ description="==> generates the target database">
+
+ <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>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- I N S E R T S I N G L E S Q L F I L E S -->
+ <!-- ================================================================ -->
+
+ <target
+ name="insert-sql"
+ description="==> inserts the generated sql ">
+
+ <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>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- J D B C TO X M L -->
+ <!-- ================================================================ -->
+
+ <target
+ name="jdbc"
+ description="==> jdbc to xml">
+
+ <echo message="+-----------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Generating XML from JDBC connection ! |"/>
+ <echo message="| |"/>
+ <echo message="+-----------------------------------------------+"/>
+
+ <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}"
+ />
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- Generate SQL from XML data file -->
+ <!-- ================================================================ -->
+
+ <target
+ name="datasql"
+ description="==> generates sql from data xml">
+
+ <echo message="+-----------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Generating SQL from data XML ! |"/>
+ <echo message="| |"/>
+ <echo message="+-----------------------------------------------+"/>
+
+ <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"
+ />
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- G E N E R A T E I D B R O K E R I N I T S Q L -->
+ <!-- ================================================================ -->
+
+ <target
+ name="id-table-init-sql"
+ description="==> generates initialization sql for ID Broker">
+
+ <echo message="+------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Generating initialization SQL |"/>
+ <echo message="| for ID Broker system! |"/>
+ <echo message="| |"/>
+ <echo message="+------------------------------------------+"/>
+
+ <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>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- Dump data from database into xml file -->
+ <!-- ================================================================ -->
+
+ <target
+ name="datadump"
+ description="==> dump data from database into xml file">
+
+ <echo message="+-----------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Dumping the data from database into XML |"/>
+ <echo message="| |"/>
+ <echo message="+-----------------------------------------------+"/>
+
+ <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"
+ />
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- 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 -->
+ <!-- ================================================================ -->
+
+ <target
+ name="datadtd"
+ description="==> generates the DATA DTD for your project">
+
+ <echo message="+-----------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Generating Data DTD for YOUR Torque project! |"/>
+ <echo message="| |"/>
+ <echo message="+-----------------------------------------------+"/>
+
+ <torque-data-model
+ contextProperties="${torque.contextProperties}"
+ controlTemplate="${torque.template.dataDtd}"
+ outputDirectory="${torque.schema.dir}"
+ outputFile="report.${torque.project}.datadtd.generation"
+ templatePath="${torque.templatePath}"
+ useClasspath="${torque.useClasspath}"
+ xmlFile="${torque.schema.dir}/${torque.project}-schema.xml"
+ />
+ </target>
<!-- ================================================================ -->
<!-- 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 -->
@@ -163,19 +533,13 @@
unless="torque.internal.om.uptodate"
description="==> generates the Peer-based object model for your project">
+ <echo message="+------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Generating Peer-based Object Model for |"/>
+ <echo message="| YOUR Torque project! |"/>
+ <echo message="| |"/>
+ <echo message="+------------------------------------------+"/>
- <echo>
-+------------------------------------------
-|
-| Generating Peer-based Object Model for
-|
-| db type : '${torque.database}'
-| lib dir : ${lib.dir}
-| target dir : ${src.dir}
-+------------------------------------------
- </echo>
-
-
<antcall target="om-classpath"/>
<antcall target="om-template"/>
<!-- antcall target="zip-base-om"/ -->
@@ -185,7 +549,7 @@
<torque-data-model
contextProperties="${torque.contextProperties}"
controlTemplate="${torque.template.om}"
- outputDirectory="${src.dir}"
+ outputDirectory="${torque.java.dir}"
outputFile="report.${torque.project}.om.generation"
targetDatabase="${torque.database}"
targetPackage="${torque.targetPackage}"
@@ -195,14 +559,26 @@
excludes="${torque.schema.om.excludes}"
/>
</torque-data-model>
+ <torque-data-model
+ contextProperties="${torque.contextProperties}"
+ controlTemplate="${torque.template.om.base}"
+ outputDirectory="${torque.java.base.dir}"
+ outputFile="report.${torque.project}.om.base.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>
</target>
<target name="om-template" unless="torque.internal.useClasspath">
-
<torque-data-model
contextProperties="${torque.contextProperties}"
controlTemplate="${torque.template.om}"
- outputDirectory="${src.dir}"
+ outputDirectory="${torque.java.dir}"
outputFile="report.${torque.project}.om.generation"
targetDatabase="${torque.database}"
targetPackage="${torque.targetPackage}"
@@ -212,42 +588,180 @@
excludes="${torque.schema.om.excludes}"
/>
</torque-data-model>
+ <torque-data-model
+ contextProperties="${torque.contextProperties}"
+ controlTemplate="${torque.template.om.base}"
+ outputDirectory="${torque.java.base.dir}"
+ outputFile="report.${torque.project}.om.base.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>
</target>
+
<!-- ================================================================ -->
- <!-- G E N E R A T E D O C S -->
+ <!-- G E N E R A T E O M Z I P F I L E -->
<!-- ================================================================ -->
- <!-- Generates documentation to -->
- <!-- ${torque.doc.dir}/project-schema.html -->
+ <!-- Moves the files out of your source tree and into a zip file. -->
<!-- ================================================================ -->
+ <target name="check-om-zip">
+ <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>
+ </target>
+
<target
- name="doc"
- description="==> generates documentation for your datamodel">
+ name="om-zip"
+ depends="check-om-zip"
+ description="==> moves source om files to separate jar and out of the source tree">
<echo message="+------------------------------------------+"/>
- <echo message="|"/>
- <echo message="| Generating docs for the ${torque.project} datamodel! |"/>
- <echo message="|"/>
+ <echo message="| |"/>
+ <echo message="| Zipping the Object Model files for YOUR |"/>
+ <echo message="| Torque project! |"/>
+ <echo message="| |"/>
<echo message="+------------------------------------------+"/>
- <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>
+ <!-- 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. -->
+ <antcall target="om-zip-worker">
+ <param name="torque.internal.omzip.type" value="src"/>
+ <param name="torque.internal.omzip.pattern" value="base"/>
+ <param name="torque.internal.omzip.files" value="java"/>
+ <param name="torque.internal.omzip.dir" value="${torque.java.dir}"/>
+ </antcall>
+ <antcall target="om-zip-worker">
+ <param name="torque.internal.omzip.type" value="src"/>
+ <param name="torque.internal.omzip.pattern" value="extension"/>
+ <param name="torque.internal.omzip.files" value="java"/>
+ <param name="torque.internal.omzip.dir" value="${torque.java.dir}"/>
+ </antcall>
+ <!-- See if the class files need jar'ed. -->
+ <antcall target="om-zip-worker">
+ <param name="torque.internal.omzip.type" value="bin"/>
+ <param name="torque.internal.omzip.pattern" value="base"/>
+ <param name="torque.internal.omzip.files" value="class"/>
+ <param name="torque.internal.omzip.dir" value="${torque.compile.build.dir}"/>
+ </antcall>
+ <antcall target="om-zip-worker">
+ <param name="torque.internal.omzip.type" value="bin"/>
+ <param name="torque.internal.omzip.pattern" value="extension"/>
+ <param name="torque.internal.omzip.files" value="class"/>
+ <param name="torque.internal.omzip.dir" value="${torque.compile.build.dir}"/>
+ </antcall>
+ </target>
+
+ <target
+ name="om-zip-worker"
+ if="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>
+
+ <antcall target="om-zip-worker-delete"/>
+
+ </target>
+
+ <target
+ name="om-zip-worker-delete"
+ if="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>
+
</target>
-
-
+
+ <!-- =================================================================== -->
+ <!-- C O M P I L E O M -->
+ <!-- =================================================================== -->
+
+ <target
+ name="compile"
+ description="==> compiles the OM classes">
+
+ <mkdir dir="${torque.compile.build.dir}"/>
+
+ <javac
+ debug="${torque.compile.debug}"
+ deprecation="${torque.compile.deprecation}"
+ destdir="${torque.compile.build.dir}"
+ optimize="${torque.compile.optimize}"
+ srcdir="${torque.compile.src.dir}">
+ <classpath refid="torque-classpath"/>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- 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 -->
+ <!-- =================================================================== -->
+
+ <target
+ name="sql2xml"
+ description="==> creates an xml schema from an sql schema">
+
+ <torque-sql-transform
+ inputFile="${torque.schema.dir}/schema.sql"
+ outputFile="${torque.schema.dir}/schema.xml"
+ />
+ </target>
+
<!-- ================================================================== -->
<!-- J A V A D O C -->
<!-- ================================================================== -->
@@ -270,4 +784,69 @@
</javadoc>
</target>
+ <!-- =================================================================== -->
+ <!-- O J B S T U F F -->
+ <!-- =================================================================== -->
+
+ <target
+ name="ojb"
+ description="==> generates the repository and om for ojb (experimental)">
+ <antcall target="ojb-repository"/>
+ <antcall target="ojb-model"/>
+ </target>
+
+ <target
+ name="ojb-repository"
+ description="==> generates the repository for ojb (experimental)">
+
+ <echo message="+------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Generating OJB repository |"/>
+ <echo message="| |"/>
+ <echo message="+------------------------------------------+"/>
+
+ <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>
+ </target>
+
+ <target
+ name="ojb-model"
+ description="==> generates an object model for ojb (experimental)">
+
+ <echo message="+------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Generating OJB model |"/>
+ <echo message="| |"/>
+ <echo message="+------------------------------------------+"/>
+
+ <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>
Modified: trunk/src/conf/conf/build.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/conf/build.xml?view=diff&rev=10433&p1=trunk/src/conf/conf/build.xml&p2=trunk/src/conf/conf/build.xml&r1=10432&r2=10433
==============================================================================
--- trunk/src/conf/conf/build.xml (original)
+++ trunk/src/conf/conf/build.xml 2007-03-28 08:36:57-0700
@@ -23,10 +23,9 @@
<project name="Scarab" default="create-db">
- <property name="root.dir" value="../.."/>
- <property name="applicationRoot" value="${basedir}/${root.dir}"/>
+ <property name="applicationRoot" value="${basedir}/../.."/>
<property name="antbase.dir" value="."/>
- <property name="workdir" value="${applicationRoot}/WEB-INF/conf"/>
+ <property name="workdir" value="${applicationRoot}/WEB-INF/conf"/>
<property name="webapp.dir" value=".."/>
<property name="webapp.lib.dir" value="../lib"/>
@@ -42,16 +41,8 @@
<property name="database.instance.dir" value="../../database/instance"/>
<property name="database.instance.sql.dir" value="${database.instance.dir}/sql"/>
<property name="database.instance.schema.dir" value="${database.instance.dir}/schema"/>
- <property name="database.instance.upgrade.dir" value="${database.instance.sql.dir}/${scarab.database.type}/upgrade"/>
- <property name="database.version" value=""/>
-
- <property name="torque.database.driver" value="${scarab.database.jdbc.driver}"/>
- <property name="torque.database.url" value="${scarab.database.url}"/>
- <property name="torque.database.user" value="${scarab.database.admin.username}"/>
- <property name="torque.database.password" value="${scarab.database.admin.password}"/>
- <property name="database.src.upgrade.dir" value="${database.src.sql.dir}/${scarab.database.type}/upgrade"/>
-
- <!-- Build classpath -->
+ <property name="database.instance.upgrade.dir" value="${database.instance.sql.dir}/${scarab.database.type}/upgrade"/>
+
<path id="classpath">
<fileset dir="${workdir}/..">
<include name="**/*.jar"/>
@@ -60,7 +51,7 @@
</path>
-
+
<!-- ================================================================== -->
<!-- Scarab Welcome header -->
<!-- ================================================================== -->
@@ -121,12 +112,6 @@
todir="${database.instance.schema.dir}"
filtering="true" overwrite="true"/>
- <!-- copy the scarab specific build.properties over -->
- <filter token="DATABASE_TYPE" value="${scarab.database.type}"/>
- <copy file="${database.src.dir}/torque.static.props"
- tofile="${database.instance.schema.dir}/build.static.properties"
- filtering="true" overwrite="true"/>
-
</target>
<!-- ================================================================== -->
@@ -169,15 +154,16 @@
<!-- ============================================= -->
<!-- generate .sql files into the target directory -->
<!-- ============================================= -->
- <ant antfile="runtime-torque.xml" target="sql" inheritAll="false">
- <!-- See the Torque tasks' build.properties for options -->
- <property name="torque.contextProperties"
- value="${database.instance.schema.dir}/build.static.properties"/>
- <property name="idTableXMLFile" value=""/>
- <property name="root.dir" value=".."/>
- <property name="applicationRoot" value="${applicationRoot}"/>
- <property name="repository.dir" value="../lib"/>
- <property name="database.url" value="${scarab.database.url}"/>
+ <ant antfile="build-torque.xml" target="sql" inheritAll="false">
+ <property name="lib.dir" value="../lib"/>
+ <property name="torque.schema.dir" value="../../database/instance/schema"/>
+ <property name="torque.sql.dir" value="../../database/instance/sql"/>
+ <property name="torque.contextProperties" value="${database.src.dir}/torque.static.props"/>
+ <property name="torque.database" value="${scarab.database.type}"/>
+ <property name="torque.database.driver" value="${scarab.database.jdbc.driver}"/>
+ <property name="torque.database.url" value="${scarab.database.url}"/>
+ <property name="torque.database.user" value="${scarab.database.admin.username}"/>
+ <property name="torque.database.password" value="${scarab.database.admin.password}"/>
</ant>
<echo>perform Schema fixes ...</echo>
Removed: trunk/src/conf/conf/runtime-torque.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/conf/runtime-torque.xml?view=auto&rev=10432
Removed: trunk/src/conf/torque.customized.props.tmpl
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/torque.customized.props.tmpl?view=auto&rev=10432
Modified: trunk/src/conf/torque.static.props
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/torque.static.props?view=diff&rev=10433&p1=trunk/src/conf/torque.static.props&p2=trunk/src/conf/torque.static.props&r1=10432&r2=10433
==============================================================================
--- trunk/src/conf/torque.static.props (original)
+++ trunk/src/conf/torque.static.props 2007-03-28 08:36:57-0700
@@ -1,163 +1,13 @@
-# -------------------------------------------------------------------
-#
-# T O R Q U E C O N F I G U R A T I O N F I L E
-#
-# static properties (fixed for this project)
-# exception: The database type will be set once
-# -------------------------------------------------------------------
-
-
-
-#######################################
-#
-# B A S I C P R O P E R T I E S
-#
-#######################################
-
-torque.home = .
-
-# This is the name of your Turbine project. Your generated sources
-# will be named using the project name selected below. If your
-# project=killerapp then you will have a generated:
-#
-# killerapp-schema.sql
-#
-# IMPORTANT!
-# This means that your project schema MUST be named
-# killerapp-schema.xml and it MUST be placed in the
-# schema directory for Torque to work property.
-#
-# The object model sources generated are independent of
-# the project name selected.
-torque.project = scarab
-
-# This is the target database, only considered when generating
-# the SQL for your Turbine project. Your possible choices are
-#
-# db2
-# db2400
-# hypersonic
-# mysql
-# oracle
-# postgresql
-# mssql
-#
-# Default: none
-# -------------------------------------------------------------------
-torque.database=@DATABASE_TYPE@
-
-torque.idTableXMLFile =
-
-# These settings will allow you to customize the way your schema
-# documentation is created.
-# Valid formats are: html, anakia (for use with jakarta-site2)
-torque.doc.format = html
-
-torque.initialID = 101
-
-# -------------------------------------------------------------------
-#
-# O B J E C T M O D E L I N F O R M A T I O N
-#
-# -------------------------------------------------------------------
-# These settings will allow you to customize the way your
-# Peer-based object model is created.
-# -------------------------------------------------------------------
-# addSaveMethod=true adds tracking code to determine how to save objects
-#
-# addGetByNameMethod=true adds methods to get fields by name/position
-#
-# complexObjectModel=true generates an om with collection support
-#
-# addTimeStamp=true puts time stamps in generated files
-#
-# addIntakeRetrievable=implement Intake's Retrievable interface
-# -------------------------------------------------------------------
+torque.project=scarab
torque.targetPackage=org.tigris.scarab.om
-torque.retrievableInterface = org.apache.fulcrum.intake.Retrievable
-torque.basePrefix=Base
-torque.addSaveMethod=true
-torque.addGetByNameMethod=true
-torque.complexObjectModel=true
+torque.schema.om.includes=${torque.project}-schema.xml
+torque.retrievableInterface=org.apache.fulcrum.intake.Retrievable
torque.addTimeStamp=false
torque.addIntakeRetrievable=true
-torque.overloadKeySetters=true
-
-# -------------------------------------------------------------------
-# Generate Manager classes that use JCS for caching. This is still
-# considered experimental.
-# -------------------------------------------------------------------
torque.useManagers=true
-
-# Tells JDBC task that javaName attribute for the tables and columns
-# should be made same as SQL name.
-torque.sameJavaName=false
-
-
-#######################################
-#
-# D I R E C T O R I E S
-#
-#######################################
-
-torque.output.dir = ${torque.home}/../../../../../../src
-torque.schema.dir = ${torque.home}/schema
-
-torque.doc.dir = ${torque.output.dir}/doc
-torque.java.dir = ${torque.output.dir}/java
-torque.javadoc.dir = ${torque.output.dir}/javadoc
-torque.ojb.dir = ${torque.output.dir}/ojb
-torque.sql.dir = ${torque.output.dir}/sql
-torque.basezip.dir = ${torque.output.dir}
-
-#######################################
-#
-# P A T H S
-#
-#######################################
-
-torque.templatePath = templates
-torque.useClasspath = true
-
-
-# -------------------------------------------------------------------
-#
-# 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
-#
-#######################################
-
-torque.compile.src.dir = ${torque.java.dir}
-torque.compile.build.dir = bin/classes
-torque.compile.debug = on
-torque.compile.deprecation = off
-torque.compile.optimize = off
-
-
+torque.runOnlyOnSchemaChange=true
+torque.useClasspath=true
+torque.initialId=1000
+torque.saveException=TorqueException
Modified: trunk/src/java/org/tigris/scarab/components/TorqueComponent.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/components/TorqueComponent.java?view=diff&rev=10433&p1=trunk/src/java/org/tigris/scarab/components/TorqueComponent.java&p2=trunk/src/java/org/tigris/scarab/components/TorqueComponent.java&r1=10432&r2=10433
==============================================================================
--- trunk/src/java/org/tigris/scarab/components/TorqueComponent.java (original)
+++ trunk/src/java/org/tigris/scarab/components/TorqueComponent.java 2007-03-28 08:36:57-0700
@@ -74,17 +74,6 @@
}
/**
- * Creates a new instance.
- *
- * @param torqueInstance The instance of the Torque core used by
- * this component.
- */
- protected TorqueComponent(TorqueInstance torqueInstance)
- {
- super(torqueInstance);
- }
-
- /**
* @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
*/
public void configure(Configuration configuration)
@@ -100,9 +89,9 @@
throws Exception
{
getLogger().debug("initialize()");
- //return the configuration object with the torque values only.
- org.apache.commons.configuration.Configuration c = Turbine.getConfiguration();
- Torque.getInstance().init(c);
+ Torque.init(
+ Turbine.getConfiguration()
+ );
}
}
Modified: trunk/src/java/org/tigris/scarab/om/AttributePeer.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/AttributePeer.java?view=diff&rev=10433&p1=trunk/src/java/org/tigris/scarab/om/AttributePeer.java&p2=trunk/src/java/org/tigris/scarab/om/AttributePeer.java&r1=10432&r2=10433
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/AttributePeer.java (original)
+++ trunk/src/java/org/tigris/scarab/om/AttributePeer.java 2007-03-28 08:36:57-0700
@@ -86,10 +86,8 @@
{
List result = null;
Boolean deletedBool = (includeDeleted ? Boolean.TRUE : Boolean.FALSE);
- // 4th element is ignored due to bug in torque that is being
- // Matched in ScarabCache
Serializable[] keys = {ATTRIBUTE_PEER, attributeType, deletedBool,
- sortColumn, null, sortPolarity};
+ sortColumn, sortPolarity};
Object obj = ScarabCache.get(keys);
if (obj == null)
{
Modified: trunk/src/java/org/tigris/scarab/om/IssueTemplateInfoPeer.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/IssueTemplateInfoPeer.java?view=diff&rev=10433&p1=trunk/src/java/org/tigris/scarab/om/IssueTemplateInfoPeer.java&p2=trunk/src/java/org/tigris/scarab/om/IssueTemplateInfoPeer.java&r1=10432&r2=10433
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/IssueTemplateInfoPeer.java (original)
+++ trunk/src/java/org/tigris/scarab/om/IssueTemplateInfoPeer.java 2007-03-28 08:36:57-0700
@@ -90,7 +90,7 @@
throws TorqueException, ScarabException
{
List templates = null;
- Serializable[] key = {TEMPLATE_PEER, GET_TEMPLATES, module, null,
+ Serializable[] key = {TEMPLATE_PEER, GET_TEMPLATES, module,
issueType, user, sortColumn, sortPolarity, type};
Object obj = ScarabCache.get(key);
if (obj == null)
Modified: trunk/src/java/org/tigris/scarab/om/QueryPeer.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/QueryPeer.java?view=diff&rev=10433&p1=trunk/src/java/org/tigris/scarab/om/QueryPeer.java&p2=trunk/src/java/org/tigris/scarab/om/QueryPeer.java&r1=10432&r2=10433
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/QueryPeer.java (original)
+++ trunk/src/java/org/tigris/scarab/om/QueryPeer.java 2007-03-28 08:36:57-0700
@@ -104,9 +104,7 @@
}
else
{
- // FIXME: 4th element is ignored due to bug in torque
- // not yet fixed in torque-3.0
- Serializable[] key = {QUERY_PEER, GET_QUERIES, module, null,
+ Serializable[] key = {QUERY_PEER, GET_QUERIES, module,
issueType, user, sortColumn, sortPolarity, type};
Object obj = QueryManager.getMethodResult().get(key);
if (obj == null)
Modified: trunk/src/java/org/tigris/scarab/om/ScarabModule.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/ScarabModule.java?view=diff&rev=10433&p1=trunk/src/java/org/tigris/scarab/om/ScarabModule.java&p2=trunk/src/java/org/tigris/scarab/om/ScarabModule.java&r1=10432&r2=10433
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/ScarabModule.java (original)
+++ trunk/src/java/org/tigris/scarab/om/ScarabModule.java 2007-03-28 08:36:57-0700
@@ -509,8 +509,7 @@
throws TorqueException
{
List result = null;
- // 4th element is ignored due to bug in torque
- Serializable[] keys = {this, GET_USERS, firstName, null, lastName,
+ Serializable[] keys = {this, GET_USERS, firstName, lastName,
username, email, issueType};
Object obj = ScarabCache.get(keys);
if (obj == null)
Modified: trunk/src/java/org/tigris/scarab/services/cache/ScarabCacheKey.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/services/cache/ScarabCacheKey.java?view=diff&rev=10433&p1=trunk/src/java/org/tigris/scarab/services/cache/ScarabCacheKey.java&p2=trunk/src/java/org/tigris/scarab/services/cache/ScarabCacheKey.java&r1=10432&r2=10433
==============================================================================
--- trunk/src/java/org/tigris/scarab/services/cache/ScarabCacheKey.java (original)
+++ trunk/src/java/org/tigris/scarab/services/cache/ScarabCacheKey.java 2007-03-28 08:36:57-0700
@@ -205,12 +205,7 @@
this.arg2 = keys[3];
if (n>2)
{
- // TODO: this is a bug, but it matches a bug in torque
- // and we use this cache as an alternative to the jcs
- // cache in some cases. Need to update it once we have
- // time to upgrade torque.
- //this.arg3 = keys[4];
- this.arg2 = keys[4];
+ this.arg3 = keys[4];
if (n>3)
{
this.moreThanThree = keys;
Removed: trunk/www/repository/commons-lang/jars/commons-lang-2.0.jar
Url: http://scarab.tigris.org/source/browse/scarab/trunk/www/repository/commons-lang/jars/commons-lang-2.0.jar?view=auto&rev=10432
Added: trunk/www/repository/commons-lang/jars/commons-lang-2.1.jar
Url: http://scarab.tigris.org/source/browse/scarab/trunk/www/repository/commons-lang/jars/commons-lang-2.1.jar?view=auto&rev=10433
==============================================================================
Binary file. No diff available.
Removed: trunk/www/repository/torque/jars/torque-3.2.jar
Url: http://scarab.tigris.org/source/browse/scarab/trunk/www/repository/torque/jars/torque-3.2.jar?view=auto&rev=10432
Added: trunk/www/repository/torque/jars/torque-3.3-RC2.jar
Url: http://scarab.tigris.org/source/browse/scarab/trunk/www/repository/torque/jars/torque-3.3-RC2.jar?view=auto&rev=10433
==============================================================================
Binary file. No diff available.
Removed: trunk/www/repository/torque/jars/torque-gen-3.2.jar
Url: http://scarab.tigris.org/source/browse/scarab/trunk/www/repository/torque/jars/torque-gen-3.2.jar?view=auto&rev=10432
Added: trunk/www/repository/torque/jars/torque-gen-3.3-RC2.jar
Url: http://scarab.tigris.org/source/browse/scarab/trunk/www/repository/torque/jars/torque-gen-3.3-RC2.jar?view=auto&rev=10433
==============================================================================
Binary file. No diff available.
Removed: trunk/www/repository/torque/jars/torque-gen-templates-3.2.jar
Url: http://scarab.tigris.org/source/browse/scarab/trunk/www/repository/torque/jars/torque-gen-templates-3.2.jar?view=auto&rev=10432
Added: trunk/www/repository/torque/jars/torque-gen-templates-3.3-RC2.jar
Url: http://scarab.tigris.org/source/browse/scarab/trunk/www/repository/torque/jars/torque-gen-templates-3.3-RC2.jar?view=auto&rev=10433
==============================================================================
Binary file. No diff available.
Removed: trunk/www/repository/torque/plugins/maven-torque-plugin-3.1.1.jar
Url: http://scarab.tigris.org/source/browse/scarab/trunk/www/repository/torque/plugins/maven-torque-plugin-3.1.1.jar?view=auto&rev=10432
Removed: trunk/www/repository/torque/plugins/maven-torque-plugin-3.2-rc2.jar
Url: http://scarab.tigris.org/source/browse/scarab/trunk/www/repository/torque/plugins/maven-torque-plugin-3.2-rc2.jar?view=auto&rev=10432
Modified: trunk/xdocs/scarab_properties.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/xdocs/scarab_properties.xml?view=diff&rev=10433&p1=trunk/xdocs/scarab_properties.xml&p2=trunk/xdocs/scarab_properties.xml&r1=10432&r2=10433
==============================================================================
--- trunk/xdocs/scarab_properties.xml (original)
+++ trunk/xdocs/scarab_properties.xml 2007-03-28 08:36:57-0700
@@ -1496,353 +1496,6 @@
</property>
</group>
</section>
- <section name="TORQUE">
- <property>
- <name>torque.project</name>
- <default>scarab</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.database</name>
- <default>${scarab.database.type}</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.database.type</name>
- <default>${torque.database}</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.database.user</name>
- <default>${scarab.database.username}</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.database.password</name>
- <default>${scarab.database.password}</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.database.createUrl</name>
- <default>${scarab.database.admin.url}</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.database.buildUrl</name>
- <default>${scarab.database.url}</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.database.driver</name>
- <default>${scarab.database.jdbc.driver}</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.doc.format</name>
- <default>anakia</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.targetPackage</name>
- <default>org.tigris.scarab.om</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.schema.om.includes</name>
- <default>${torque.project}-schema.xml</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.schema.om.excludes</name>
- <default/>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.retrievableInterface</name>
- <default>org.apache.fulcrum.intake.Retrievable</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.addGetByNameMethod</name>
- <default>true</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.addTimeStamp</name>
- <default>false</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.addIntakeRetrievable</name>
- <default>true</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.overloadKeySetters</name>
- <default>true</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.useManagers</name>
- <default>true</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.runOnlyOnSchemaChange</name>
- <default>true</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- <details>
- standard torque properties
- </details>
-
- </property>
- <property>
- <name>torque.generateDeprecated</name>
- <default>true</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.output.dir</name>
- <default>${root.dir}/target</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.template.path</name>
- <default>templates</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.doc.dir</name>
- <default>${maven.gen.docs}/databases</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.java.dir</name>
- <default>${root.dir}/src/java</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- <details>
- torque.java.dir=${torque.output.dir}/java
- </details>
-
- </property>
- <property>
- <name>torque.schema.dir</name>
- <default>${root.dir}/src/schema</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.javadoc.dir</name>
- <default>${torque.output.dir}/javadoc</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.sql.dir</name>
- <default>${torque.output.dir}/sql</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.basePrefix</name>
- <default>Base</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.useClasspath</name>
- <default>true</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.initialId</name>
- <default>1000</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="advanced">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.addSaveMethod</name>
- <default>true</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.addGetByNameMethod</name>
- <default>true</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.complexObjectModel</name>
- <default>true</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.saveException</name>
- <default>TorqueException</default>
- <comment/>
- <type>Build</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.schema.sql.includes</name>
- <default>*-schema.xml</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.schema.sql.excludes</name>
- <default/>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.schema.doc.includes</name>
- <default>*-schema.xml</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.schema.doc.excludes</name>
- <default/>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.schema.createdb.includes</name>
- <default>*-schema.xml</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.schema.createdb.excludes</name>
- <default/>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.schema.initsql.includes</name>
- <default>*-schema.xml</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- <property>
- <name>torque.schema.initsql.excludes</name>
- <default>id-table-schema.xml</default>
- <comment/>
- <type>Runtime</type>
- <customization modification="optional">advanced</customization>
- <file/>
- </property>
- </section>
-
<section name="MIGRATION">
<details>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.