prickett 02/03/17 21:55:37
Modified: periodicity build.properties build.xml
periodicity/conf/torque build.mysql.properties
Log:
Added database property to build.properties
Fixed the generate-sql task so that it would generate the periodicity sql
Revision Changes Path
1.4 +29 -0 jakarta-commons-sandbox/periodicity/build.properties
Index: build.properties
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/build.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- build.properties 17 Mar 2002 21:45:31 -0000 1.3
+++ build.properties 18 Mar 2002 05:55:37 -0000 1.4
@@ -4,6 +4,27 @@
#
# -------------------------------------------------------------------
+# -------------------------------------------------------------------
+#
+# T A R G E T D A T A B A S E
+#
+# -------------------------------------------------------------------
+# This is the target database, only considered when generating
+# the SQL for your Turbine project. Your possible choices are
+#
+# db2 Not yet supported - If you are motivated you could try
+# db2400 Not yet supported - If you are motivated you could try
+# hypersonic Not yet supported - If you are motivated you could try
+# mysql Supported as of 0.0.1
+# oracle Not yet supported - If you are motivated you could try
+# postgresql Supported as of 0.0.1
+# mssql Not yet supported - If you are motivated you could try
+#
+# Default: none
+# -------------------------------------------------------------------
+
+database = mysql
+
# --------------------------------------------------------------------
#
# D A T A B A S E U S E R
@@ -19,6 +40,14 @@
# --------------------------------------------------------------------
databasePassword =
+
+# --------------------------------------------------------------------
+#
+# D A T A B A S E H O S T
+#
+# --------------------------------------------------------------------
+
+databaseHost=127.0.0.1
# --------------------------------------------------------------------
#
1.9 +19 -10 jakarta-commons-sandbox/periodicity/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/build.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- build.xml 17 Mar 2002 21:44:14 -0000 1.8
+++ build.xml 18 Mar 2002 05:55:37 -0000 1.9
@@ -33,7 +33,7 @@
<pathelement location="${torque.jar}"/>
</path>
- <target name="mv_src">
+ <target name="mv-src">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dest}"/>
<mkdir dir="${build.src}"/>
@@ -42,24 +42,26 @@
</copy>
</target>
- <target name="extract_torque_files">
+ <target name="extract-torque-files">
<unjar src="${torque.jar}" dest="${torque.home}"/>
</target>
- <target name="generate_sql">
+ <target name="generate-sql" depends="update-id-xml">
<taskdef
name="torque-sql"
- classname="org.apache.torque.task.TorqueSQLTask"/>
+ classname="org.apache.torque.task.TorqueSQLTask">
+ <classpath refid="classpath"/>
+ </taskdef>
<torque-sql
contextProperties="${build.properties}"
controlTemplate="${SQLControlTemplate}"
outputDirectory="${build.src}/sql"
- templatePath="${torque.home}/${templatePath}"
+ templatePath="${torque.home}"
basePathToDbProps="sql/base/"
sqldbmap="${build.src}/sql/sqldb.map"
outputFile="report.${project}.sql.generation"
- idTableXMLFile="${torque.home}/schema/id-table-schema.xml"
+ idTableXMLFile="${torque.home}/id-table-schema.xml"
targetDatabase="${database}">
<fileset dir="./src/xml">
<include name="periodicity-schema.xml"/>
@@ -67,7 +69,8 @@
</torque-sql>
</target>
- <target name="generate_peers" depends="mv_src">
+ <target name="generate-peers" depends="mv-src">
+ <antcall target="extract-torque-files"/>
<taskdef
name="torque-om"
classname="org.apache.torque.task.TorqueObjectModelTask">
@@ -78,7 +81,7 @@
contextProperties="./conf/torque/build.om.properties"
controlTemplate="${OMControlTemplate}"
outputDirectory="${build.src}"
- templatePath="${torque.home}/${templatePath}"
+ templatePath="${torque.home}"
basePathToDbProps="sql/base/"
outputFile="report.${project}.om.generation"
targetPackage="${targetPackage}.om"
@@ -89,7 +92,7 @@
</torque-om>
</target>
- <target name="test_vobjects">
+ <target name="test-vobjects">
<junit printsummary="yes" haltonfailure="yes">
<test name="org.apache.commons.periodicity.test.VObjectTests"
haltonfailure="no" outfile="result">
@@ -98,7 +101,7 @@
</junit>
</target>
- <target name="core" depends="generate_peers">
+ <target name="core" depends="generate-peers">
<javac srcdir="${build.dir}" destdir="${build.dest}" debug="${debug}">
<classpath refid="classpath"/>
</javac>
@@ -124,4 +127,10 @@
dependencyFile="conf/torque/deps.list"
/>
</target>
+
+ <target name="update-id-xml">
+ <get
src="http://cvs.apache.org/viewcvs/~checkout~/jakarta-turbine-torque/src/schema/id-table-schema.xml"
+ dest="${torque.home}/id-table-schema.xml"/>
+ </target>
+
</project>
1.5 +11 -29
jakarta-commons-sandbox/periodicity/conf/torque/build.mysql.properties
Index: build.mysql.properties
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/periodicity/conf/torque/build.mysql.properties,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- build.mysql.properties 15 Mar 2002 15:57:18 -0000 1.4
+++ build.mysql.properties 18 Mar 2002 05:55:37 -0000 1.5
@@ -1,47 +1,29 @@
# -------------------------------------------------------------------
#
-# P E R I O D I C I T Y M Y S Q L C O N F I G U R A T I O N F I L E
+# P E R I O D I C I T Y D B C O N F I G U R A T I O N F I L E
#
# -------------------------------------------------------------------
+
# -------------------------------------------------------------------
-#
-# T A R G E T D A T A B A S E
-#
-# -------------------------------------------------------------------
-# 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
+# M Y S Q L D A T A B A S E S E T T I N G S
#
-# Default: none
# -------------------------------------------------------------------
-database = mysql
+mysql.createDatabaseUrl = jdbc:mysql://${databaseHost}:5432/mysql
+mysql.databaseUrl = jdbc:mysql://${databaseHost}:5432/periodicity
+mysql.databaseDriver = org.gjt.mm.mysql.Driver
# -------------------------------------------------------------------
+#
+# P O S T G R E S Q L D A T A B A S E S E T T I N G S
#
-# D A T A B A S E S E T T I N G S
-#
-# -------------------------------------------------------------------
-# JDBC connection settings. This is used by the JDBCToXML task that
-# will create an XML database schema from JDBC metadata. These
-# settings are also used by the SQL Ant task to initialize your
-# Turbine system with the generated SQL.
# -------------------------------------------------------------------
-createDatabaseUrl = jdbc:mysql://127.0.0.1:5432/mysql
-databaseUrl = jdbc:mysql://127.0.0.1:5432/periodicity
-databaseDriver = org.gjt.mm.mysql.Driver
-databaseUser = root
-databasePassword =
-databaseHost = 127.0.0.1
+postgresql.createDatabaseUrl=jdbc:postgresql://${databaseHost}:5432/template1
+postgresql.databaseUrl=jdbc:postgresql://${databaseHost}:5432/periodicity
+postgresql.databaseDriver=org.postgresql.Driver
# Tells JDBC task that javaName attribute for the tables and columns
# should be made same as SQL name.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>