[libpostgresql-jdbc-java] 04/11: gij/gcj has some JDK1.5 classes in it, but it only supports JDK1.4 as the default source level. This confuses older ant versions and our build script tries to compile a JDK1.5 version. Instead of letting ant detect the java version, let the jvm tell us that itself using java.specification.version as suggested by Heikki Linnakangas. Also put in a check for a JDK1.6 compile attempt and bail out with an explanatory unsupported error message instead of just failing at some random point.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:19:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to tag REL8_1_406
in repository libpostgresql-jdbc-java.

commit 9acc6d67235d656556903d6740ece88606b3739e
Author: Kris Jurka <books at ejurka.com>
Date:   Sat Apr 29 02:18:51 2006 +0000

    gij/gcj has some JDK1.5 classes in it, but it only supports JDK1.4
    as the default source level.  This confuses older ant versions and
    our build script tries to compile a JDK1.5 version.  Instead of
    letting ant detect the java version, let the jvm tell us that itself
    using java.specification.version as suggested by Heikki Linnakangas.
    Also put in a check for a JDK1.6 compile attempt and bail out with
    an explanatory unsupported error message instead of just failing
    at some random point.
---
 build.xml | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/build.xml b/build.xml
index 520f143..33586b8 100644
--- a/build.xml
+++ b/build.xml
@@ -8,7 +8,7 @@
 
   This file now requires Ant 1.4.1.  2002-04-18
 
-  $PostgreSQL: pgjdbc/build.xml,v 1.63 2005/02/01 07:27:53 jurka Exp $
+  $PostgreSQL: pgjdbc/build.xml,v 1.64 2005/10/29 01:14:49 davec Exp $
 
 -->
 
@@ -34,15 +34,15 @@
   <target name="check_versions">
     <condition property="jdbc2">
       <or>
-        <equals arg1="${ant.java.version}" arg2="1.2"/>
-        <equals arg1="${ant.java.version}" arg2="1.3"/>
+        <equals arg1="${java.specification.version}" arg2="1.2"/>
+        <equals arg1="${java.specification.version}" arg2="1.3"/>
       </or>
     </condition>
     <condition property="jdbc3">
-        <equals arg1="${ant.java.version}" arg2="1.4"/>
+        <equals arg1="${java.specification.version}" arg2="1.4"/>
     </condition>
     <condition property="jdbc3g">
-	<equals arg1="${ant.java.version}" arg2="1.5"/>
+	<equals arg1="${java.specification.version}" arg2="1.5"/>
     </condition>
     <condition property="jdbc3any">
       <or>
@@ -50,6 +50,11 @@
         <isset property="jdbc3g" />
       </or>
     </condition>
+    <condition property="jdbc4">
+        <equals arg1="${java.specification.version}" arg2="1.6"/>
+    </condition>
+
+    <fail if="jdbc4" message="Building with JDK 1.6 not supported." />
 
     <available property="datasource" classname="javax.sql.DataSource"/>
     <available property="ssl" classname="javax.net.ssl.SSLContext"/>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git



More information about the pkg-java-commits mailing list