[libvirt] [PATCH libvirt-java] Set source and target version to Java 1.6

On platforms with Java 1.7 it will still produce compatible code with Java 1.6 platforms Java 1.6 is still out there and widely used. Signed-off-by: Wido den Hollander <wido@widodh.nl> --- build.properties | 2 ++ build.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.properties b/build.properties index 679a271..7721f90 100644 --- a/build.properties +++ b/build.properties @@ -2,5 +2,7 @@ version=0.5.0 release=1 libvirt.required=0.9.12 java.required=1:1.5.0 +java.target=1.6 +java.source=1.6 rpm.topdir=/home/veillard/rpms jar.dir=/usr/share/java diff --git a/build.xml b/build.xml index 61b15bb..acd9c92 100644 --- a/build.xml +++ b/build.xml @@ -52,7 +52,7 @@ destdir="target/testclasses" cache="target/cache" closure="true" /> - <javac srcdir="src/test/java" debug="${javac.debug}" includes="**/*.java" classpathref="test.classpath" destdir="target/testclasses" includeAntRuntime="false" /> + <javac srcdir="src/test/java" debug="${javac.debug}" source="${java.source}" target="${java.target}" includes="**/*.java" classpathref="test.classpath" destdir="target/testclasses" includeAntRuntime="false" /> </target> <target name="build" depends="init" description="builds the code"> @@ -60,7 +60,7 @@ destdir="target/classes" cache="target/cache" closure="true" /> - <javac srcdir="src/main/java" debug="${javac.debug}" includes="**/*.java" classpathref="compile.classpath" destdir="target/classes" includeAntRuntime="false" /> + <javac srcdir="src/main/java" debug="${javac.debug}" source="${java.source}" target="${java.target}" includes="**/*.java" classpathref="compile.classpath" destdir="target/classes" includeAntRuntime="false" /> </target> <target name="test" depends="buildtests" description="tests the code"> -- 1.7.9.5

On Tue, Sep 17, 2013 at 10:04:59AM +0200, Wido den Hollander wrote:
On platforms with Java 1.7 it will still produce compatible code with Java 1.6 platforms
Java 1.6 is still out there and widely used.
ACK, please push, Daniel
Signed-off-by: Wido den Hollander <wido@widodh.nl> --- build.properties | 2 ++ build.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/build.properties b/build.properties index 679a271..7721f90 100644 --- a/build.properties +++ b/build.properties @@ -2,5 +2,7 @@ version=0.5.0 release=1 libvirt.required=0.9.12 java.required=1:1.5.0 +java.target=1.6 +java.source=1.6 rpm.topdir=/home/veillard/rpms jar.dir=/usr/share/java diff --git a/build.xml b/build.xml index 61b15bb..acd9c92 100644 --- a/build.xml +++ b/build.xml @@ -52,7 +52,7 @@ destdir="target/testclasses" cache="target/cache" closure="true" /> - <javac srcdir="src/test/java" debug="${javac.debug}" includes="**/*.java" classpathref="test.classpath" destdir="target/testclasses" includeAntRuntime="false" /> + <javac srcdir="src/test/java" debug="${javac.debug}" source="${java.source}" target="${java.target}" includes="**/*.java" classpathref="test.classpath" destdir="target/testclasses" includeAntRuntime="false" /> </target>
<target name="build" depends="init" description="builds the code"> @@ -60,7 +60,7 @@ destdir="target/classes" cache="target/cache" closure="true" /> - <javac srcdir="src/main/java" debug="${javac.debug}" includes="**/*.java" classpathref="compile.classpath" destdir="target/classes" includeAntRuntime="false" /> + <javac srcdir="src/main/java" debug="${javac.debug}" source="${java.source}" target="${java.target}" includes="**/*.java" classpathref="compile.classpath" destdir="target/classes" includeAntRuntime="false" /> </target>
<target name="test" depends="buildtests" description="tests the code"> -- 1.7.9.5
-- Daniel Veillard | Open Source and Standards, Red Hat veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library http://libvirt.org/

At Tue, 17 Sep 2013 10:04:59 +0200, Wido den Hollander wrote:
On platforms with Java 1.7 it will still produce compatible code with Java 1.6 platforms
Java 1.6 is still out there and widely used.
AFAIK, the code is 1.5 compliant which would be "least common denominator". So, there's no need raising the bar to 1.6 actually. The question is, do we (need to) care about 1.5? / Claudio -- AV-Test GmbH, Henricistraße 20, 04155 Leipzig, Germany Phone: +49 341 265 310 19 Web:<http://www.av-test.org> Eingetragen am / Registered at: Amtsgericht Stendal (HRB 114076) Geschaeftsfuehrer (CEO): Andreas Marx, Guido Habicht, Maik Morgenstern

On 09/17/2013 01:14 PM, Claudio Bley wrote:
At Tue, 17 Sep 2013 10:04:59 +0200, Wido den Hollander wrote:
On platforms with Java 1.7 it will still produce compatible code with Java 1.6 platforms
Java 1.6 is still out there and widely used.
AFAIK, the code is 1.5 compliant which would be "least common denominator". So, there's no need raising the bar to 1.6 actually.
You are correct, I tried to set target and source to 1.5 and that compiled flawlessly.
The question is, do we (need to) care about 1.5?
As far as I know there are no support distributions which still ship with 1.5 The platforms which ship with 1.6: - RHEL 5 and 6 - Ubuntu 10.04 and 12.04 RHEL 6 and Ubuntu 12.04 also support 1.7. But since the code is 1.5 compliant I won't complain if we set target and source to 1.5. Although I don't think there are any 1.5 users left who use libvirt-java Wido
/ Claudio

At Tue, 17 Sep 2013 13:48:11 +0200, Wido den Hollander wrote:
On 09/17/2013 01:14 PM, Claudio Bley wrote:
At Tue, 17 Sep 2013 10:04:59 +0200, Wido den Hollander wrote:
On platforms with Java 1.7 it will still produce compatible code with Java 1.6 platforms
Java 1.6 is still out there and widely used.
AFAIK, the code is 1.5 compliant which would be "least common denominator". So, there's no need raising the bar to 1.6 actually.
You are correct, I tried to set target and source to 1.5 and that compiled flawlessly.
The question is, do we (need to) care about 1.5?
As far as I know there are no support distributions which still ship with 1.5
The platforms which ship with 1.6: - RHEL 5 and 6 - Ubuntu 10.04 and 12.04
RHEL 6 and Ubuntu 12.04 also support 1.7.
But since the code is 1.5 compliant I won't complain if we set target and source to 1.5. Although I don't think there are any 1.5 users left who use libvirt-java
Since there're a whole slew of JVM implementations out there I feel a bit weary bumping it up to 1.6. On the other hand, it all depends on JNA, which JVMs they support with their JNI wrapper code. Looking at the ChangeLog of JNA (https://github.com/twall/jna/blob/master/CHANGES.md#features-1) I see that they have decided to switch to 1.6 (from 1.4) in version 4.0. Considering this, I'm all for pulling the plug and go for 1.6 in libvirt, too. So, ACK as is. I'll push your patch shortly (since I guess you don't have commit access, do you?)... Claudio -- AV-Test GmbH, Henricistraße 20, 04155 Leipzig, Germany Phone: +49 341 265 310 19 Web:<http://www.av-test.org> Eingetragen am / Registered at: Amtsgericht Stendal (HRB 114076) Geschaeftsfuehrer (CEO): Andreas Marx, Guido Habicht, Maik Morgenstern

On 09/17/2013 02:58 PM, Claudio Bley wrote:
At Tue, 17 Sep 2013 13:48:11 +0200, Wido den Hollander wrote:
On 09/17/2013 01:14 PM, Claudio Bley wrote:
At Tue, 17 Sep 2013 10:04:59 +0200, Wido den Hollander wrote:
On platforms with Java 1.7 it will still produce compatible code with Java 1.6 platforms
Java 1.6 is still out there and widely used.
AFAIK, the code is 1.5 compliant which would be "least common denominator". So, there's no need raising the bar to 1.6 actually.
You are correct, I tried to set target and source to 1.5 and that compiled flawlessly.
The question is, do we (need to) care about 1.5?
As far as I know there are no support distributions which still ship with 1.5
The platforms which ship with 1.6: - RHEL 5 and 6 - Ubuntu 10.04 and 12.04
RHEL 6 and Ubuntu 12.04 also support 1.7.
But since the code is 1.5 compliant I won't complain if we set target and source to 1.5. Although I don't think there are any 1.5 users left who use libvirt-java
Since there're a whole slew of JVM implementations out there I feel a bit weary bumping it up to 1.6.
On the other hand, it all depends on JNA, which JVMs they support with their JNI wrapper code. Looking at the ChangeLog of JNA (https://github.com/twall/jna/blob/master/CHANGES.md#features-1) I see that they have decided to switch to 1.6 (from 1.4) in version 4.0.
Considering this, I'm all for pulling the plug and go for 1.6 in libvirt, too.
Cool. Let's keep it with 1.6 then.
So, ACK as is. I'll push your patch shortly (since I guess you don't have commit access, do you?)...
I don't have commit access indeed, so if you could push it? We (the CloudStack project) are no only facing the issue that the current 0.5.0 release is Java 1.7 which will break existing setups of users out there. Wido
Claudio

At Tue, 17 Sep 2013 15:46:43 +0200, Wido den Hollander wrote:
Considering this, I'm all for pulling the plug and go for 1.6 in libvirt, too.
Cool. Let's keep it with 1.6 then.
So, ACK as is. I'll push your patch shortly (since I guess you don't have commit access, do you?)...
I don't have commit access indeed, so if you could push it?
OK, took me a bit longer since I was busy with other stuff. Also, looking at the build.properties, I realized the java.required property needs to be adjusted as well when bumping the source and target versions to 1.6. So, I've just pushed your patch with this squashed in: Subject: [libvirt-java] [PATCH] On RPM systems at least version 1.6.0 of a JVM or JDK is required by the spec file to install and build the library respectively. Signed-off-by: Claudio Bley <cbley@av-test.de> --- build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.properties b/build.properties index 7721f90..9601187 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ version=0.5.0 release=1 libvirt.required=0.9.12 -java.required=1:1.5.0 +java.required=1.6.0 java.target=1.6 java.source=1.6 rpm.topdir=/home/veillard/rpms -- 1.7.9.5 -- AV-Test GmbH, Henricistraße 20, 04155 Leipzig, Germany Phone: +49 341 265 310 19 Web:<http://www.av-test.org> Eingetragen am / Registered at: Amtsgericht Stendal (HRB 114076) Geschaeftsfuehrer (CEO): Andreas Marx, Guido Habicht, Maik Morgenstern
participants (3)
-
Claudio Bley
-
Daniel Veillard
-
Wido den Hollander