mpoeschl 02/05/10 05:12:31
Modified: src/conf build-torque.xml
. build-test.xml build.xml
Log:
add missing -classpath targets and a testbed using all -cp tasks
Revision Changes Path
1.30 +72 -1 jakarta-turbine-torque/src/conf/build-torque.xml
Index: build-torque.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/conf/build-torque.xml,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- build-torque.xml 7 May 2002 20:45:12 -0000 1.29
+++ build-torque.xml 10 May 2002 12:12:31 -0000 1.30
@@ -429,10 +429,11 @@
controlTemplate="${SQLControlTemplate}"
outputDirectory="${torque.home}/${outputDirectory}/sql"
useClasspath="true"
+ basePathToDbProps="sql/base/"
sqldbmap="${torque.home}/${outputDirectory}/sql/sqldb.map"
outputFile="report.${project}.sql.generation"
targetDatabase="${database}"
- >
+ idTableXMLFile="${idTableXMLFile}">
<fileset dir="${torque.home}/${schemaDirectory}">
<include name="*-schema.xml"/>
</fileset>
@@ -472,6 +473,76 @@
dataDTD="${torque.home}/${schemaDirectory}/${project}-data.dtd"
targetDatabase="${database}"
sqldbmap="${basedir}/${outputDirectory}/sql/sqldb.map"
+ />
+ </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="project-datadtd-classpath"
+ description="==> generates the DATA DTD for your project">
+
+ <echo message="+-----------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Generating Data DTD for YOUR Turbine project! |"/>
+ <echo message="| Woo hoo! |"/>
+ <echo message="| |"/>
+ <echo message="+-----------------------------------------------+"/>
+
+ <taskdef
+ name="torque-datadtd"
+ classname="org.apache.torque.task.TorqueDataModelTask">
+ <classpath refid="torque-classpath"/>
+ </taskdef>
+
+ <torque-datadtd
+ contextProperties="${build.properties}"
+ controlTemplate="${DataDTDControlTemplate}"
+ outputDirectory="${torque.home}/${outputDirectory}"
+ useClasspath="true"
+ outputFile="report.${project}.datadtd.generation"
+ xmlFile="${torque.home}/${schemaDirectory}/${project}-schema.xml"
+ />
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- Dump data from database into xml file -->
+ <!-- ================================================================ -->
+
+ <target
+ name="project-datadump-classpath"
+ description="==> dump data from database into xml file">
+
+ <echo message="+-----------------------------------------------+"/>
+ <echo message="| |"/>
+ <echo message="| Dumping the data from database into XML |"/>
+ <echo message="| Woo hoo! |"/>
+ <echo message="| |"/>
+ <echo message="+-----------------------------------------------+"/>
+ <echo message=" taking build.properties from: ${build.properties}"/>
+
+ <taskdef
+ name="torque-datadump"
+ classname="org.apache.torque.task.TorqueDataDumpTask">
+ <classpath refid="torque-classpath"/>
+ </taskdef>
+
+ <torque-datadump
+ contextProperties="${build.properties}"
+ controlTemplate="${DataDumpControlTemplate}"
+ outputDirectory="${torque.home}/${outputDirectory}"
+ useClasspath="true"
+ outputFile="report.${project}.datadump.generation"
+ xmlFile="${torque.home}/${schemaDirectory}/${project}-schema.xml"
+ databaseDriver="${databaseDriver}"
+ databaseUrl="${databaseUrl}"
+ databaseUser="${databaseUser}"
+ databasePassword="${databasePassword}"
+ databaseName="${databaseName}"
/>
</target>
1.28 +129 -14 jakarta-turbine-torque/build-test.xml
Index: build-test.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/build-test.xml,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- build-test.xml 17 Apr 2002 11:53:11 -0000 1.27
+++ build-test.xml 10 May 2002 12:12:31 -0000 1.28
@@ -19,7 +19,7 @@
<!-- ============================================================== -->
<target
- name="test"
+ name="test-prepare"
depends="filterTokens,test-libs,test-templates">
<!-- Use the profile as the build.properties file
@@ -54,12 +54,26 @@
file="${src.dir}/conf/build-torque.xml"
overwrite="yes"
/>
+ </target>
+ <target
+ name="test"
+ depends="test-prepare"
+ description="run the testbed">
<antcall target="test-pre-runtime"/>
<antcall target="test-runtime"/>
<antcall target="test-post-runtime"/>
</target>
+ <target
+ name="test-classpath"
+ depends="test-prepare"
+ description="run the testbed using the -classpath tasks">
+ <antcall target="test-pre-runtime-classpath"/>
+ <antcall target="test-runtime"/>
+ <antcall target="test-post-runtime-classpath"/>
+ </target>
+
<!-- ============================================================== -->
<!-- P R E R U N T I M E T E S T S -->
<!-- ============================================================== -->
@@ -92,6 +106,17 @@
<antcall target="test-project-om"/>
</target>
+ <target
+ name="test-pre-runtime-classpath">
+
+ <antcall target="test-project-doc-classpath"/>
+ <antcall target="test-create-db-classpath"/>
+ <antcall target="test-project-sql-classpath"/>
+ <antcall target="test-id-table-init-sql-classpath"/>
+ <antcall target="test-project-insert-sql"/>
+ <antcall target="test-project-om-classpath"/>
+ </target>
+
<!-- ============================================================== -->
<!-- P O S T R U N T I M E T E S T S -->
<!-- ============================================================== -->
@@ -113,6 +138,22 @@
</target>
<target
+ name="test-post-runtime-classpath">
+
+ <antcall target="test-project-datadtd-classpath"/>
+ <antcall target="test-project-datadump-classpath"/>
+ <antcall target="test-project-datasql-classpath"/>
+ <antcall target="test-project-jdbc"/>
+
+ <!--
+ <antcall target="test-project-sql-classpath"/>
+ <antcall target="test-project-om-classpath"/>
+ <antcall target="test-project-sql2xml"/>
+ -->
+
+ </target>
+
+ <target
name="test-project-sql">
<ant
dir="${torque.buildFileDir}"
@@ -122,6 +163,15 @@
</target>
<target
+ name="test-project-sql-classpath">
+ <ant
+ dir="${torque.buildFileDir}"
+ antfile="${torque.buildFile}"
+ target="project-sql-classpath">
+ </ant>
+ </target>
+
+ <target
name="test-id-table-init-sql">
<ant
dir="${torque.buildFileDir}"
@@ -131,6 +181,15 @@
</target>
<target
+ name="test-id-table-init-sql-classpath">
+ <ant
+ dir="${torque.buildFileDir}"
+ antfile="${torque.buildFile}"
+ target="id-table-init-sql-classpath">
+ </ant>
+ </target>
+
+ <target
name="test-project-doc">
<ant
dir="${torque.buildFileDir}"
@@ -140,6 +199,15 @@
</target>
<target
+ name="test-project-doc-classpath">
+ <ant
+ dir="${torque.buildFileDir}"
+ antfile="${torque.buildFile}"
+ target="project-doc-classpath">
+ </ant>
+ </target>
+
+ <target
name="test-create-db">
<ant
dir="${torque.buildFileDir}"
@@ -149,6 +217,15 @@
</target>
<target
+ name="test-create-db-classpath">
+ <ant
+ dir="${torque.buildFileDir}"
+ antfile="${torque.buildFile}"
+ target="project-create-db-classpath">
+ </ant>
+ </target>
+
+ <target
name="test-project-insert-sql">
<ant
dir="${torque.buildFileDir}"
@@ -164,9 +241,23 @@
antfile="${torque.buildFile}"
target="project-om">
</ant>
-
<!-- Compile the classes -->
+ <ant
+ dir="${torque.buildFileDir}"
+ antfile="${torque.buildFile}"
+ target="compile"
+ inheritAll="false">
+ </ant>
+ </target>
+ <target
+ name="test-project-om-classpath">
+ <ant
+ dir="${torque.buildFileDir}"
+ antfile="${torque.buildFile}"
+ target="project-om-classpath">
+ </ant>
+ <!-- Compile the classes -->
<ant
dir="${torque.buildFileDir}"
antfile="${torque.buildFile}"
@@ -186,6 +277,16 @@
</ant>
</target>
+ <target
+ name="test-project-datadtd-classpath">
+ <ant
+ dir="${torque.buildFileDir}"
+ antfile="${torque.buildFile}"
+ target="project-datadtd-classpath"
+ inheritAll="false">
+ </ant>
+ </target>
+
<!-- Still uses ${project} references. BAD!!! -->
<target
name="test-project-datadump">
@@ -197,6 +298,16 @@
</ant>
</target>
+ <target
+ name="test-project-datadump-classpath">
+ <ant
+ dir="${torque.buildFileDir}"
+ antfile="${torque.buildFile}"
+ target="project-datadump-classpath"
+ inheritAll="false">
+ </ant>
+ </target>
+
<!-- Still uses ${project} references. BAD!!! -->
<target
name="test-project-datasql">
@@ -215,25 +326,29 @@
</target>
<target
- name="test-project-jdbc">
+ name="test-project-datasql-classpath">
+ <copy
+ todir="${torque.distDir}/schema/"
+ file="${torque.distDir}/src/bookstore-data.dtd"/>
+ <copy
+ tofile="${torque.distDir}/schema/bookstore-data.xml"
+ file="${torque.distDir}/src/bookstore-bookstore-all-data.xml"/>
<ant
dir="${torque.buildFileDir}"
antfile="${torque.buildFile}"
- target="project-jdbc">
- <property name="torque.home" value="${torque.distDir}"/>
+ target="project-datasql-classpath"
+ inheritAll="false">
</ant>
</target>
<target
- name="test-project-sql-classpath">
- </target>
-
- <target
- name="test-project-om-classpath">
- </target>
-
- <target
- name="test-project-sql2xml">
+ name="test-project-jdbc">
+ <ant
+ dir="${torque.buildFileDir}"
+ antfile="${torque.buildFile}"
+ target="project-jdbc">
+ <property name="torque.home" value="${torque.distDir}"/>
+ </ant>
</target>
<target name="filterTokens">
1.46 +11 -2 jakarta-turbine-torque/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/build.xml,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- build.xml 9 May 2002 23:01:21 -0000 1.45
+++ build.xml 10 May 2002 12:12:31 -0000 1.46
@@ -96,6 +96,15 @@
<ant antfile="build-test.xml"/>
</target>
+ <target
+ name="test-classpath"
+ depends="jar"
+ description="==> runtime tests using the -classpath tasks (set
torque.testProfile in your build.properties)">
+
+ <ant antfile="build-test.xml"
+ target="test-classpath"/>
+ </target>
+
<!-- ================================================================== -->
<!-- I N I T -->
<!-- ================================================================== -->
@@ -644,9 +653,9 @@
<target
name="maven:compile">
-
+
<ant antfile="build-maven.xml" target="maven:compile"/>
-
+
</target>
</project>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>