prickett 02/03/18 19:37:40
Modified: periodicity build.xml
Log:
Added a value for build.sysclasspath. The system classpath is first and
the defined classpaths are next
Added a dependency on extract-torque-files for update-id-xml.
Added a project-create-mysql-db task
Added a project-create-db task - the project-create-db task is a task that
issues ant antcall to the task for the specific database that was specified
in the build.properties file.
Submitted by: Jeff Prickett
Revision Changes Path
1.12 +38 -1 jakarta-commons-sandbox/periodicity/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/build.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- build.xml 19 Mar 2002 00:54:39 -0000 1.11
+++ build.xml 19 Mar 2002 03:37:40 -0000 1.12
@@ -14,6 +14,7 @@
<property name="final.name" value="${project}-${version}"/>
<property name="final.dir" value="./${final-name}"/>
<property name="build.properties" value="build.properties"/>
+ <property name="build.sysclasspath" value="first"/>
<property file="${build.properties}"/>
<property file="./conf/torque/build.om.properties"/>
<property file="./conf/torque/build.mysql.properties"/>
@@ -161,7 +162,7 @@
/>
</target>
- <target name="update-id-xml">
+ <target name="update-id-xml" depends="extract-torque-files">
<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>
@@ -172,5 +173,41 @@
<antcall target="update-id-xml"/>
</target>
+ <target name="project-create-mysql-db">
+ <taskdef
+ name="torque-create-db"
+ classname="org.apache.torque.task.TorqueCreateDatabase">
+ <classpath refid="classpath"/>
+ </taskdef>
+ <torque-create-db
+ controlTemplate="sql/db-init/Control.vm"
+ outputDirectory="${build.src}/sql"
+ templatePath="${torque.home}"
+ outputFile="create-db.sql"
+ targetPlatform="${platform}"
+ targetDatabase="${database}"
+ databaseUser="${databaseUser}"
+ databasePassword="${databasePassword}"
+ databaseHost="${databaseHost}">
+ <fileset dir="./src/xml">
+ <include name="periodicity-schema.xml"/>
+ </fileset>
+ </torque-create-db>
+ <sql
+ driver="${mysql.databaseDriver}"
+ url="${mysql.createDatabaseUrl}"
+ userid="${databaseUser}"
+ password="${databasePassword}"
+ src="${build.src}/sql/create-db.sql"
+ autocommit="true"
+ onerror="continue">
+ <classpath refid="classpath"/>
+ </sql>
+ </target>
+
+ <target name="project-create-db" depends="extract-torque-files">
+ <antcall target="project-create-${database}-db"/>
+ </target>
+
</project>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>