You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2019/02/01 19:32:07 UTC

[thrift] branch master updated: THRIFT-4766: Fix JDK11 build (#1723)

This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 1686c87  THRIFT-4766: Fix JDK11 build (#1723)
1686c87 is described below

commit 1686c87024766015d510fc007aeef548a9c1a2a0
Author: Fokko Driesprong <fo...@driesprong.frl>
AuthorDate: Fri Feb 1 20:31:58 2019 +0100

    THRIFT-4766: Fix JDK11 build (#1723)
    
    * [THRIFT-4766] Enable JDK9 build
    * THRIFT-4766: build on bionic using native jdk (java-11-openjdk)
    Change from headless to the normal JDK. Maybe the libasound is pulled
    in transitively.
---
 build/docker/ubuntu-bionic/Dockerfile | 8 +++++---
 debian/control                        | 2 +-
 lib/java/gradle.properties            | 1 +
 lib/java/gradle/environment.gradle    | 2 ++
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/build/docker/ubuntu-bionic/Dockerfile b/build/docker/ubuntu-bionic/Dockerfile
index a75af31..3566199 100644
--- a/build/docker/ubuntu-bionic/Dockerfile
+++ b/build/docker/ubuntu-bionic/Dockerfile
@@ -68,6 +68,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
       debhelper \
       flex \
       gdb \
+      libasound2 \
+      libatk-bridge2.0-0 \
+      libgtk-3-0 \
       llvm \
       ninja-build \
       pkg-config \
@@ -174,9 +177,8 @@ RUN apt-get install -y --no-install-recommends \
 `# Java dependencies` \
       ant \
       ant-optional \
-      openjdk-8-jdk \
-      maven && \
-    update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
+      maven \
+      openjdk-11-jdk-headless
 
 RUN apt-get install -y --no-install-recommends \
 `# Lua dependencies` \
diff --git a/debian/control b/debian/control
index 9818a37..9de66fc 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 9), build-essential, mono-mcs, python-dev, ant,
     pkg-config, libtool, bison, flex, libboost-dev | libboost1.53-dev | libboost1.63-all-dev,
     python-all, python-setuptools, python-all-dev, python-all-dbg,
     python3-all, python3-setuptools, python3-all-dev, python3-all-dbg,
-    openjdk-7-jdk | openjdk-8-jdk | default-jdk,
+    openjdk-8-jdk | openjdk-8-jdk-headless | openjdk-11-jdk | openjdk-11-jdk-headless | default-jdk,
     libboost-test-dev | libboost-test1.53-dev | libboost-test1.63-dev, libevent-dev, libssl-dev, perl (>= 5.8.0-7),
     php (>= 5), php-dev (>= 5), libglib2.0-dev, qtchooser, qtbase5-dev-tools
 Maintainer: Thrift Developer's <de...@thrift.apache.org>
diff --git a/lib/java/gradle.properties b/lib/java/gradle.properties
index a964675..0811659 100644
--- a/lib/java/gradle.properties
+++ b/lib/java/gradle.properties
@@ -31,3 +31,4 @@ slf4j.version=1.7.25
 servlet.version=2.5
 junit.version=4.12
 mockito.version=1.9.5
+javax.annotation.version=1.3.2
diff --git a/lib/java/gradle/environment.gradle b/lib/java/gradle/environment.gradle
index 9b7eb1e..45fa63a 100644
--- a/lib/java/gradle/environment.gradle
+++ b/lib/java/gradle/environment.gradle
@@ -48,6 +48,7 @@ ext.servletVersion = property('servlet.version')
 ext.slf4jVersion = property('slf4j.version')
 ext.junitVersion = property('junit.version')
 ext.mockitoVersion = property('mockito.version')
+ext.javaxAnnotationVersion = property('javax.annotation.version')
 
 // In this section you declare where to find the dependencies of your project
 repositories {
@@ -66,6 +67,7 @@ dependencies {
     compile "org.apache.httpcomponents:httpclient:${httpclientVersion}"
     compile "org.apache.httpcomponents:httpcore:${httpcoreVersion}"
     compile "javax.servlet:servlet-api:${servletVersion}"
+    compile "javax.annotation:javax.annotation-api:${javaxAnnotationVersion}"
 
     testCompile "junit:junit:${junitVersion}"
     testCompile "org.mockito:mockito-all:${mockitoVersion}"