You are viewing a plain text version of this content. The canonical link for it is here.
Posted to tdk-dev@turbine.apache.org by jv...@apache.org on 2001/05/27 19:14:52 UTC
cvs commit: jakarta-turbine-tdk/src/share/sample/WEB-INF/build build.xml
jvanzyl 01/05/27 10:14:52
Modified: src/share/sample/WEB-INF/build build.xml
Log:
- adding separate targets for:
inserting turbine sql
inserting project sql
so that you can easily change the project schema and regenerate
the sql and insert it. this wasn't possible before.
Revision Changes Path
1.2 +24 -27 jakarta-turbine-tdk/src/share/sample/WEB-INF/build/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-tdk/src/share/sample/WEB-INF/build/build.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.xml 2001/05/25 06:27:45 1.1
+++ build.xml 2001/05/27 17:14:52 1.2
@@ -20,17 +20,15 @@
<property file="${user.home}/build.properties"/>
<property name="build.properties" value="build.properties"/>
- <property name="project" value="@PROJECT@"/>
<property name="version" value="0.1"/>
<property name="build.dest" value="../classes"/>
<property name="src.dir" value="../src/java"/>
<property name="final.name" value="${project}-${version}"/>
<property name="final.dir" value="../${final.name}/"/>
- <property name="ant.home" value="."/>
<property name="debug" value="on"/>
<property name="optimize" value="off"/>
<property name="deprecation" value="on"/>
-
+
<!-- ================================================================ -->
<!-- I N I T T A S K T A R G E T -->
<!-- ================================================================ -->
@@ -86,33 +84,22 @@
<!-- ================================================================ -->
<target name="init">
-
- <!-- Create all the necessary SQL -->
+
+ <antcall target="create-database"/>
<antcall target="turbine-sql"/>
<antcall target="turbine-id-table-sql"/>
<antcall target="turbine-id-table-init-sql"/>
<antcall target="turbine-security-sql"/>
+ <antcall target="turbine-insert-sql"/>
+
<antcall target="project-sql"/>
<antcall target="project-id-table-init-sql"/>
-
- <!-- Create the database and insert the SQL -->
-
- <antcall target="create-database"/>
- <antcall target="insert-sql"/>
-
- <!-- Generate the project OM and compile the sources -->
-
+ <antcall target="project-insert-sql"/>
<antcall target="project-om"/>
- <antcall target="compile"/>
- <!--
- Update the TurbineResources.properties file with
- the info user should have put in the project
- properties file :-)
- -->
-
<antcall target="update-tr-props"/>
+ <antcall target="compile"/>
</target>
@@ -122,6 +109,7 @@
<!-- Create the target database by executing a generated script -->
<!-- that is capable of performing the task. -->
<!-- ================================================================ -->
+
<target name="create-database" depends="init-tasks" unless="database.manual.creation">
<property name="script" value="create-database.${targetPlatformExt}"/>
@@ -135,7 +123,7 @@
/>
<chmod file="${outputDirectory}/sql/${script}" perm="+x"/>
- <exec executable="${fullPathOutputDirectory}/sql/${script}"/>
+ <exec executable="${fullPathOutputDirectory}/sql/${script}" failonerror="yes"/>
</target>
@@ -329,10 +317,10 @@
</target>
<!-- ================================================================ -->
- <!-- I N S E R T G E N E R A T E D S Q L I N T O D A T A B A S E -->
+ <!-- I N S E R T T U R B I N E S Q L -->
<!-- ================================================================ -->
-
- <target name="insert-sql">
+
+ <target name="turbine-insert-sql">
<antcall target="insert-sql-file">
<param name="sqlFile" value="${outputDirectory}/sql/turbine-schema.sql"/>
@@ -345,18 +333,27 @@
<antcall target="insert-sql-file">
<param name="sqlFile" value="${outputDirectory}/sql/id-table-schema.sql"/>
</antcall>
-
+
<antcall target="insert-sql-file">
- <param name="sqlFile" value="${outputDirectory}/sql/${project}-schema.sql"/>
+ <param name="sqlFile" value="${outputDirectory}/sql/turbine-id-table-init.sql"/>
</antcall>
+
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- I N S E R T P R O J E C T S Q L -->
+ <!-- ================================================================ -->
+
+ <target name="project-insert-sql">
<antcall target="insert-sql-file">
- <param name="sqlFile" value="${outputDirectory}/sql/turbine-id-table-init.sql"/>
+ <param name="sqlFile" value="${outputDirectory}/sql/${project}-schema.sql"/>
</antcall>
<antcall target="insert-sql-file">
<param name="sqlFile" value="${outputDirectory}/sql/${project}-id-table-init.sql"/>
</antcall>
+
</target>
<!-- ================================================================ -->
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-tdk-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-tdk-dev-help@jakarta.apache.org