mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
Finally created ant build.xml file
This commit is contained in:
parent
e34d442dbb
commit
42d26fb9f7
@ -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
|
||||
|
||||
|
59
src/interfaces/jdbc/build.xml
Normal file
59
src/interfaces/jdbc/build.xml
Normal file
@ -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>
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user