Commit 42d26fb9 authored by Peter Mount's avatar Peter Mount

Finally created ant build.xml file

parent e34d442d
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
......
<!--
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
......@@ -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");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment