postgresql-jdbc.git / summary / log / commit / refs
commit a94dfb45af3a61bc5df7635c5472ff14375cfe04
Author: Craig Ringer <craig@2ndquadrant.com>
Date: Thu Oct 30 03:38:15 2014 +0000
Use maven-ant-tasks to fetch waffle-jna
We need Waffle and its underlying JNA dependencies in order to support
SSPI authentication on Windows. We compile that support on all platforms,
it just only actually works when running on a Windows host.
build.xml | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/build.xml b/build.xml
index 956fb9c6..345ca721 100644
--- a/build.xml
+++ b/build.xml
@@ -107,11 +107,17 @@
<include name="${package}/xa/jdbc4/*.java" if="jdbc4any"/>
</patternset>
- <artifact:dependencies pathId="dependency.classpath" useScope="test">
- <dependency groupId="junit" artifactId="junit" version="4.0" scope="test"/>
- </artifact:dependencies>
+ <target name="maven-dependencies">
+ <artifact:dependencies pathId="dependency.compile.classpath" filesetId="dependency.compile.fileset">
+ <dependency groupId="com.github.dblock.waffle" artifactId="waffle-jna" version="1.7"/>
+ </artifact:dependencies>
+
+ <artifact:dependencies pathId="dependency.test.classpath" useScope="test">
+ <dependency groupId="junit" artifactId="junit" version="4.0" scope="test"/>
+ </artifact:dependencies>
+ </target>
- <target name="check_versions">
+ <target name="check_versions" depends="maven-dependencies">
<condition property="jdbc2">
<or>
<equals arg1="${java.specification.version}" arg2="1.2"/>
@@ -226,6 +232,8 @@
<include name="${package}/translation/*.class" />
</fileset>
+ <fileset refid="dependency.compile.fileset"/>
+
<metainf dir="META-INF">
</metainf>
<manifest>
@@ -241,7 +249,8 @@
<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}" source="${java.specification.version}">
- <classpath refid="dependency.classpath" />
+ <classpath refid="dependency.compile.classpath"/>
+ <classpath refid="dependency.test.classpath"/>
<patternset refid="jdbc.version.src.pattern"/>
</javac>
</target>
@@ -397,7 +406,7 @@
<!-- Prepares the build directory -->
- <target name="prepare">
+ <target name="prepare" depends="maven-dependencies">
<!-- use the enable_debug option from configure -->
<condition property="debug" value="on">
<and>
@@ -449,7 +458,8 @@
<target name="testjar" depends="jar">
<mkdir dir="${builddir}/tests"/>
<javac srcdir="${srcdir}" destdir="${builddir}/tests" debug="${debug}" source="${java.specification.version}">
- <classpath refid="dependency.classpath" />
+ <classpath refid="dependency.compile.classpath" />
+ <classpath refid="dependency.test.classpath" />
<include name="${package}/test/**" />
<exclude name="${package}/test/jdbc4/**" unless="jdbc4tests" />
@@ -488,7 +498,8 @@
<sysproperty key="protocolVersion" value="${protocolVersion}" />
<sysproperty key="ssltest.properties" value="${ssltest.properties}" />
- <classpath refid="dependency.classpath" />
+ <classpath refid="dependency.compile.classpath" />
+ <classpath refid="dependency.test.classpath" />
<classpath>
<pathelement location="${artifact.jar}" />
<pathelement location="${jardir}/postgresql-tests.jar" />
[parent: 8d11432ed522]