diff options
Diffstat (limited to 'build.patch')
-rw-r--r-- | build.patch | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/build.patch b/build.patch new file mode 100644 index 0000000..1e5f54a --- /dev/null +++ b/build.patch @@ -0,0 +1,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:="(&(|(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"/> + |