db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject cvs commit: db-ojb build.xml
Date Thu, 15 Jul 2004 21:54:05 GMT
tomdz       2004/07/15 14:54:05

  Modified:    lib      commons-sql-1.0-dev.jar
               .        build.xml
  Log:
  Added first, not yet fully functional version of prepare-testdb target that uses commons-sql;
using it is controlled via the system property 'use-commons-sql', e.g.
  
    ant -Duse-commons-sql=true junit
  
  The target will also generate an file test.sql in the target/test/ojb folder, that contains
the sql used to create the database
  
  Revision  Changes    Path
  1.2       +126 -122  db-ojb/lib/commons-sql-1.0-dev.jar
  
  	<<Binary file>>
  
  
  1.145     +42 -4     db-ojb/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/build.xml,v
  retrieving revision 1.144
  retrieving revision 1.145
  diff -u -r1.144 -r1.145
  --- build.xml	27 Jun 2004 09:19:01 -0000	1.144
  +++ build.xml	15 Jul 2004 21:54:04 -0000	1.145
  @@ -354,11 +354,19 @@
   	</target>
   
       <!-- ================================================================== -->
  -    <!-- prepare testdb using torque                                        -->
  +    <!-- prepare testdb                                                     -->
       <!-- ================================================================== -->
       <target name="prepare-testdb"
  +            description="prepare testdb using torque or commons-sql"
  +            depends="prepare-testdb-torque, prepare-testdb-commons-sql"/>
  +
  +    <!-- ================================================================== -->
  +    <!-- prepare testdb using torque                                        -->
  +    <!-- ================================================================== -->
  +    <target name="prepare-testdb-torque"
               description="prepare testdb using torque"
  -            depends="prepare, prepare-repository">
  +            depends="prepare, prepare-repository"
  +            unless="use-commons-sql">
   
           <copy todir="${build.test}">
               <fileset dir="${src.dir}/schema" includes="*.xml,*.dtd"/>
  @@ -367,7 +375,7 @@
               </filterset>
   
           </copy>
  -	<antcall target="getJSQLDriver"/>
  +	    <antcall target="getJSQLDriver"/>
   
           <!-- create sql scripts -->
           <ant dir="."
  @@ -402,6 +410,36 @@
           <ant dir="."
                antfile="${torque.buildFile}"
                target="project-datadump-classpath"/>
  +    </target>
  +
  +    <!-- ================================================================== -->
  +    <!-- prepare testdb using commons-sql                                   -->
  +    <!-- ================================================================== -->
  +    <target name="prepare-testdb-commons-sql"
  +            description="prepare testdb using commons-sql"
  +            depends="prepare, prepare-repository"
  +            if="use-commons-sql">
  +
  +        <copy todir="${build.test}">
  +            <fileset dir="${src.dir}/schema" includes="*.xml,*.dtd"/>
  +            <filterset>
  +                <filter token="DATABASE_DEFAULT" value="${project}" />
  +            </filterset>
  +
  +        </copy>
  +
  +        <taskdef name="dbhandling"
  +                 classname="org.apache.ojb.broker.util.dbhandling.DatabaseHandlingTask"
  +                 classpathref="compilation-classpath"/>
  +
  +        <dbhandling workdir="${build.test}/ojb">
  +            <fileset dir="${build.test}" includes="*schema.xml"/>
  +            <!-- We're dumping the sql simply for testing purposes -->
  +            <createSql destFile="${build.test}/ojb/test.sql"/>
  +            <!-- This actually creates the database -->
  +            <create/>
  +        </dbhandling>
  +
       </target>
   
       <!-- ================================================================== -->
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message