diff --git a/src/interfaces/jdbc/CHANGELOG b/src/interfaces/jdbc/CHANGELOG index 6d99f9c23885d634aed3d10e6e27b828c812cd1d..976efe17348d91a2671df50175d4e674af8c735b 100644 --- a/src/interfaces/jdbc/CHANGELOG +++ b/src/interfaces/jdbc/CHANGELOG @@ -1,3 +1,6 @@ +Tue Dec 19 17:30:00 GMT 2000 peter@retep.org.uk + - Finally created ant build.xml file + Mon Nov 20 08:12:00 GMT 2000 peter@retep.org.uk - Encoding patch to Connection by wrobell@posexperts.com.pl diff --git a/src/interfaces/jdbc/build.xml b/src/interfaces/jdbc/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..b60f2bdcf7d24e7d5261f5833e2d3f1462c9df54 --- /dev/null +++ b/src/interfaces/jdbc/build.xml @@ -0,0 +1,59 @@ +<!-- + + build file to allow ant (http://jakarta.apache.org/ant/) to be used + to build the PostgreSQL JDBC Driver. + + $Id: build.xml,v 1.1 2000/12/19 17:33:39 peter Exp $ + +--> + +<project name="postgresqlJDBC" default="jar" basedir="."> + + + <!-- set global properties for this build --> + <property name="src" value="." /> + <property name="dest" value="build" /> + <property name="package" value="org/postgresql" /> + + <!-- + This is a simpler method than utils.CheckVersion + It defaults to jdbc1, but builds jdbc2 if the java.lang.Byte class is + in the CLASSPATH (ie JDK1.2 or later), and then enterprise if the + javax.sql.DataSource class is present. + + Important: This must have the following order: jdbc1, jdbc2, enterprise + --> + <target name="check_versions"> + <available property="jdk1.2+" classname="java.lang.ThreadLocal" /> + <available property="jdk1.3+" classname="java.lang.StrictMath" /> + <available property="jdk1.2e+" classname="javax.sql.DataSource" /> + + <mkdir dir="${dest}" /> + </target> + + <target name="clean"> + <delete dir="${dest}" /> + </target> + + <!-- This is the core of the driver. It is common for all three versions --> + <target name="compile" depends="check_versions"> + <javac srcdir="${src}" destdir="${dest}"> + <include name="${package}/**" /> + <exclude name="${package}/jdbc1/**" if="jdk1.2+" /> + <exclude name="${package}/jdbc2/**" unless="jdk1.2+" /> + <exclude name="${package}/largeobject/PGBlob.java" unless="jdk1.2+" /> + <exclude name="${package}/PostgresqlDataSource.java" unless="jdk1.2e+" /> + <exclude name="${package}/xa/**" unless="jdk1.2e+" /> + </javac> + <copy todir="${dest}"> + <fileset dir="${src}"> + <include name="**/*.properties" /> + </fileset> + </copy> + </target> + + <target name="jar" depends="compile"> + <jar jarfile="postgresql.jar" basedir="${dest}" includes="org/**" /> + </target> + +</project> \ No newline at end of file diff --git a/src/interfaces/jdbc/utils/CheckVersion.java b/src/interfaces/jdbc/utils/CheckVersion.java index b82ba335fd37c81135f131a45c7a73c6e4ee08fe..8832543e7253556c08086c6655ee515cfceab53b 100644 --- a/src/interfaces/jdbc/utils/CheckVersion.java +++ b/src/interfaces/jdbc/utils/CheckVersion.java @@ -41,12 +41,14 @@ public class CheckVersion { String vmversion = System.getProperty("java.vm.version"); + System.out.println("postgresql.jdbc="+System.getProperty("postgresql.jdbc")); + // We are running a 1.1 JVM if(vmversion.startsWith("1.1")) { System.out.println("jdbc1"); - System.exit(0); + //System.exit(0); } - + else // We are running a 1.2 or 1.3 JVM if(vmversion.startsWith("1.2") || vmversion.startsWith("1.3") || @@ -59,10 +61,8 @@ public class CheckVersion System.out.println("enterprise"); else System.out.println("jdbc2"); - System.exit(0); + //System.exit(0); } - - System.out.println("huho"); - System.exit(0); + System.setProperty("postgresql.jdbc","yoyo"); } }