1
+ <!--
2
+
3
+ build file to allow ant (http://jakarta.apache.org/ant/) to be used
4
+ to build the PostgreSQL JDBC Driver.
5
+
6
+ $Id: build.xml,v 1.1 2000/12/19 17:33:39 peter Exp $
7
+
8
+ -->
9
+
10
+ <project name =" postgresqlJDBC" default =" jar" basedir =" ." >
11
+
12
+
13
+ <!-- set global properties for this build -->
14
+ <property name =" src" value =" ." />
15
+ <property name =" dest" value =" build" />
16
+ <property name =" package" value =" org/postgresql" />
17
+
18
+ <!--
19
+ This is a simpler method than utils.CheckVersion
20
+ It defaults to jdbc1, but builds jdbc2 if the java.lang.Byte class is
21
+ in the CLASSPATH (ie JDK1.2 or later), and then enterprise if the
22
+ javax.sql.DataSource class is present.
23
+
24
+ Important: This must have the following order: jdbc1, jdbc2, enterprise
25
+ -->
26
+ <target name =" check_versions" >
27
+ <available property =" jdk1.2+" classname =" java.lang.ThreadLocal" />
28
+ <available property =" jdk1.3+" classname =" java.lang.StrictMath" />
29
+ <available property =" jdk1.2e+" classname =" javax.sql.DataSource" />
30
+
31
+ <mkdir dir =" ${ dest } " />
32
+ </target >
33
+
34
+ <target name =" clean" >
35
+ <delete dir =" ${ dest } " />
36
+ </target >
37
+
38
+ <!-- This is the core of the driver. It is common for all three versions -->
39
+ <target name =" compile" depends =" check_versions" >
40
+ <javac srcdir =" ${ src } " destdir =" ${ dest } " >
41
+ <include name =" ${ package } /**" />
42
+ <exclude name =" ${ package } /jdbc1/**" if =" jdk1.2+" />
43
+ <exclude name =" ${ package } /jdbc2/**" unless =" jdk1.2+" />
44
+ <exclude name =" ${ package } /largeobject/PGBlob.java" unless =" jdk1.2+" />
45
+ <exclude name =" ${ package } /PostgresqlDataSource.java" unless =" jdk1.2e+" />
46
+ <exclude name =" ${ package } /xa/**" unless =" jdk1.2e+" />
47
+ </javac >
48
+ <copy todir =" ${ dest } " >
49
+ <fileset dir =" ${ src } " >
50
+ <include name =" **/*.properties" />
51
+ </fileset >
52
+ </copy >
53
+ </target >
54
+
55
+ <target name =" jar" depends =" compile" >
56
+ <jar jarfile =" postgresql.jar" basedir =" ${ dest } " includes =" org/**" />
57
+ </target >
58
+
59
+ </project >
0 commit comments