summaryrefslogtreecommitdiffstats
path: root/build.patch
blob: 1e5f54a2fc85ec8bd3de2fe6d8b9929c7798d99d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
diff --git a/build.xml b/build.xml
index a93eaae..399fd4d 100644
--- a/build.xml
+++ b/build.xml
@@ -79,18 +79,14 @@
     <!-- ssl -->
     <include name="${package}/ssl/**" />
 
-    <!-- gss and sspi -->
+    <!-- gss -->
     <include name="${package}/gss/*.java"/>
-    <include name="${package}/sspi/*.java"/>
 
     <!-- datasource stuff -->
     <include name="${package}/ds/**"/>
 
     <!-- XA stuff -->
     <include name="${package}/xa/**"/>
-
-    <!-- OSGi package -->
-    <include name="${package}/osgi/*.java"/>
   </patternset>
 
   <property name="waffle-jna.version" value="1.7" />
@@ -218,18 +214,6 @@
     </artifact:dependencies>
 
     <!--
-      These are used for test compilation and for test running only. They aren't
-      exposed to javac during the main driver compilation.
-    -->
-    <artifact:dependencies pathId="dependency.test.classpath"
-                           filesetId="dependency.test.fileset"
-                           useScope="test"
-                           pomRefId="org.postgresql:postgresql:pom">
-      <remoteRepository id="${maven.remote.repository.id}"
-                        url="${maven.remote.repository.url}"/>
-    </artifact:dependencies>
-
-    <!--
       These are used for building only and are only exposed for ant script
     -->
     <artifact:dependencies pathId="dependency.build.classpath">
@@ -354,13 +338,8 @@
 
   <!-- create the jar file -->
   <target name="jar" depends="compile, artifact-version">
-    <property name="temp.jar.dir" value="${builddir}/${jardir}"/>
     <property name="artifact.jar" value="${jardir}/${artifact.version.string}.jar"/>
-    <property name="artifact.jar.build" value="${temp.jar.dir}/${artifact.version.string}.jar"/>
-
-    <mkdir dir="${temp.jar.dir}" />
-
-    <jar jarfile="${artifact.jar.build}">
+    <jar jarfile="${artifact.jar}">      
       <fileset dir="${builddir}">
         <include name="${package}/**/*.class" />
       </fileset>
@@ -383,34 +362,6 @@
         <attribute name="Implementation-Vendor" value="PostgreSQL Global Development Group" />
       </manifest>
     </jar>
-
-    <!-- add OSGi meta information -->
-    <property name="osgidir" value="${builddir}/osgi"/>
-    <mkdir dir="${osgidir}"/>
-
-    <!--   create a bnd file named after the JAR file so that bnd wrap tool find it -->
-    <echo file="${osgidir}/${artifact.version.string}.bnd">
-Bundle-ManifestVersion: 2
-
-Bundle-Name: PostgreSQL JDBC Driver ${jdbc.version.upper}
-Bundle-SymbolicName: org.postgresql.${jdbc.version}
-Bundle-Version: ${osgi.version}
-
-Bundle-Vendor: PostgreSQL Global Development Group
-Bundle-Copyright: Copyright (c) 2003-2015, PostgreSQL Global Development Group
-Bundle-License: http://www.postgresql.org/about/licence/
-Bundle-DocURL: http://jdbc.postgresql.org/
-
-Bundle-Classpath: .
-Bundle-Activator: org.postgresql.osgi.PGBundleActivator
-Require-Capability: osgi.ee;filter:="(&amp;(|(osgi.ee=J2SE)(osgi.ee=JavaSE))(version>=${java.specification.version}))"
-Export-Package: org.postgresql*; version=${fullversion}
-Import-Package: javax.sql, javax.transaction.xa, javax.naming, *;resolution:=optional
-    </echo>
-
-    <!--   run wrap task from bnd -->
-    <taskdef resource="aQute/bnd/ant/taskdef.properties" classpathref="dependency.build.classpath"/> 
-    <bndwrap jars="${artifact.jar.build}" output="${artifact.jar}" definitions="${osgidir}"/>
   </target>
 
   <!-- create a distribution with docs, dependencies, and driver jar -->
@@ -469,14 +420,13 @@ Import-Package: javax.sql, javax.transaction.xa, javax.naming, *;resolution:=opt
     </zip>
   </target>
 
-  <target name="compile" depends="prepare,check_versions,driver,maven-dependencies">
+  <target name="compile" depends="prepare,check_versions,driver">
 
     <available classname="org.postgresql.Driver" property="old.driver.present" />
     <fail message="Old driver was detected on classpath or in jre/lib/ext, please remove and try again." if="old.driver.present" />
 
     <javac classpath="${srcdir}" srcdir="${srcdir}" destdir="${builddir}"
            debug="${debug}" debuglevel="lines,vars,source" source="${java.specification.version}" includeantruntime="false">
-      <classpath refid="dependency.compile.classpath"/>
       <!-- Do NOT add dependency.test here, we should not depend on junit -->
       <!-- Similarly, omit dependency.runtime, we're intentionally not compiling against those libs -->
       <patternset refid="jdbc.version.src.pattern"/>
@@ -663,13 +613,11 @@ Import-Package: javax.sql, javax.transaction.xa, javax.naming, *;resolution:=opt
 
   <!-- This compiles and builds the test jarfile. -->  
   <target name="testjar" depends="snapshot-version, jar">
+    <fail message="JUnit could not be found in your classpath.  You must download and install it from http://junit.org to build and run the test suite." unless="junit" />
     <mkdir dir="${builddir}/tests"/>
     <javac srcdir="${srcdir}" destdir="${builddir}/tests" debug="${debug}"
            debuglevel="lines,vars,source"
            source="${java.specification.version}" includeantruntime="false">
-      <classpath refid="dependency.compile.classpath" />
-      <classpath refid="dependency.runtime.classpath" />
-      <classpath refid="dependency.test.classpath" />
       <include name="${package}/test/**" />
 
       <exclude name="${package}/test/jdbc4/jdbc41/**" unless="jdbc41tests" />
@@ -712,9 +660,6 @@ Import-Package: javax.sql, javax.transaction.xa, javax.naming, *;resolution:=opt
       <sysproperty key="protocolVersion" value="${protocolVersion}" />
       <sysproperty key="ssltest.properties" value="${ssltest.properties}" />
 
-      <classpath refid="dependency.compile.classpath" />
-      <classpath refid="dependency.runtime.classpath" />
-      <classpath refid="dependency.test.classpath" />
       <classpath>
         <pathelement location="${artifact.jar}" />
         <pathelement location="${jardir}/postgresql-tests.jar" />
@@ -835,8 +780,7 @@ Import-Package: javax.sql, javax.transaction.xa, javax.naming, *;resolution:=opt
   </target>
 
   <target name="artifact-version"
-          description="Sets the version string for the jar artifact"
-          depends="maven-dependencies">
+          description="Sets the version string for the jar artifact">
     <property name="artifact.version.string" value="${maven.artifact.id}-${maven.artifact.version}.${jdbc.version}" />
     <echo message="Artifact version string: ${artifact.version.string}" />
   </target>
@@ -853,8 +797,7 @@ Import-Package: javax.sql, javax.transaction.xa, javax.naming, *;resolution:=opt
     <echo message="Maven version string: ${maven.artifact.version.string}" />
   </target>
 
-  <target name="prepare-pom" depends="maven-dependencies"
-          description="Write a pom.xml for uploading to Maven Central">
+  <target name="prepare-pom" description="Write a pom.xml for uploading to Maven Central">
 
     <mkdir dir="${builddir}/pom"/>