You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by James Stauffer <js...@spscommerce.com> on 2004/06/04 14:45:27 UTC

tests/build.xml: Support for Oracle and MS SQL

The following change should add support for Oracle and MS SQL.  I haven't
included the sample properties files yet but the fact that they are missing
shouldn't hurt anything else.
Also this specifically mentions a Weblogic driver.  What should be done for
that?

RCS file: /home/cvspublic/logging-log4j/tests/build.xml,v
retrieving revision 1.58
diff -u -r1.58 build.xml
--- tests/build.xml     31 May 2004 21:14:24 -0000      1.58
+++ tests/build.xml     4 Jun 2004 12:42:04 -0000
@@ -660,7 +660,47 @@
     <copy file="./input/db/postgresql.properties"
tofile="./input/db/db.properties"/>
     <antcall target="commonDB"/>
    </target>

+  <!-- ============ Oracle specific tests ============== -->
+  <target name="oracleCheck">
+    <condition property="oracle-present">
+    <and>
+      <available file="./input/db/oracle.properties" />
+      <available classname="oracle.jdbc.driver.OracleDriver">
+        <classpath refid="tests.classpath"/>
+      </available>
+    </and>
+    </condition>
+  </target>
+
+  <target name="oracle" depends="oracleCheck, build" if="oracle-present">
+    <delete file="./input/db/db.properties"/>
+    <echo message="Oracle available"/>
+    <copy file="./input/db/oracle.properties"
tofile="./input/db/db.properties"/>
+
+    <antcall target="commonDB"/>
+  </target>
+
+  <!-- ============ MS SQL Server specific tests ============== -->
+  <target name="msSqlCheck">
+    <condition property="msSql-present">
+    <and>
+      <available file="./input/db/msSql.properties" />
+      <available classname="weblogic.jdbc.mssqlserver4.Driver">
+        <classpath refid="tests.classpath"/>
+      </available>
+    </and>
+    </condition>
+  </target>
+
+  <target name="msSql" depends="msSqlCheck, build" if="msSql-present">
+    <delete file="./input/db/db.properties"/>
+    <echo message="Ms Sql available"/>
+    <copy file="./input/db/msSql.properties"
tofile="./input/db/db.properties"/>
+
+    <antcall target="commonDB"/>
+  </target>
+
   <!-- =================================================================
-->
   <!-- =========================   long Tests  =========================
-->
   <!-- =================================================================
-->

Re: tests/build.xml: Support for Oracle and MS SQL

Posted by Ceki Gülcü <ce...@qos.ch>.
Hi James,

I'll add these after coming back from lunch. Please send me the 
oracle.properties and mssql.properties files as well.

At 02:45 PM 6/4/2004, James Stauffer wrote:

>The following change should add support for Oracle and MS SQL.  I haven't 
>included the sample properties files yet but the fact that they are 
>missing shouldn't hurt anything else.
>
>Also this specifically mentions a Weblogic driver.  What should be done 
>for that?
>
>RCS file: /home/cvspublic/logging-log4j/tests/build.xml,v
>retrieving revision 1.58
>diff -u -r1.58 build.xml
>--- tests/build.xml     31 May 2004 21:14:24 -0000      1.58
>+++ tests/build.xml     4 Jun 2004 12:42:04 -0000
>@@ -660,7 +660,47 @@
>      <copy file="./input/db/postgresql.properties" 
> tofile="./input/db/db.properties"/>
>      <antcall target="commonDB"/>
>     </target>
>
>+  <!-- ============ Oracle specific tests ============== -->
>+  <target name="oracleCheck">
>+    <condition property="oracle-present">
>+    <and>
>+      <available file="./input/db/oracle.properties" />
>+      <available classname="oracle.jdbc.driver.OracleDriver">
>+        <classpath refid="tests.classpath"/>
>+      </available>
>+    </and>
>+    </condition>
>+  </target>
>+
>+  <target name="oracle" depends="oracleCheck, build" if="oracle-present">
>+    <delete file="./input/db/db.properties"/>
>+    <echo message="Oracle available"/>
>+    <copy file="./input/db/oracle.properties" 
>tofile="./input/db/db.properties"/>
>+
>+    <antcall target="commonDB"/>
>+  </target>
>+
>+  <!-- ============ MS SQL Server specific tests ============== -->
>+  <target name="msSqlCheck">
>+    <condition property="msSql-present">
>+    <and>
>+      <available file="./input/db/msSql.properties" />
>+      <available classname="weblogic.jdbc.mssqlserver4.Driver">
>+        <classpath refid="tests.classpath"/>
>+      </available>
>+    </and>
>+    </condition>
>+  </target>
>+
>+  <target name="msSql" depends="msSqlCheck, build" if="msSql-present">
>+    <delete file="./input/db/db.properties"/>
>+    <echo message="Ms Sql available"/>
>+    <copy file="./input/db/msSql.properties" 
>tofile="./input/db/db.properties"/>
>+
>+    <antcall target="commonDB"/>
>+  </target>
>+
>    <!-- ================================================================= 
> -->
>    <!-- =========================   long Tests  ========================= 
> -->
>    <!-- ================================================================= 
> -->

-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



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