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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new 96b1eb9  Try to force to use the latest Java 11 instead of 11.0.2 to 
fix https://bugs.openjdk.java.net/browse/JDK-8212233
96b1eb9 is described below

commit 96b1eb9697ab087e493c6eb1d46ec5e2ab2e6ac3
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sat Aug 8 22:23:43 2020 -0400

    Try to force to use the latest Java 11 instead of 11.0.2
    to fix
    https://bugs.openjdk.java.net/browse/JDK-8212233
---
 .travis.yml | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 1e4f7aa..5c8667a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,10 +19,26 @@ cache:
   directories:
     - $HOME/.m2
 
-addons:
-  apt:
-    packages:
-      - openjdk-11-jdk
+# https://docs.travis-ci.com/user/reference/linux/
+# Must use a fixed distribution (and remember to occassionally upgrade..)
+# Try to force to use the latest Java 11 instead of 11.0.2 to fix 
+# https://bugs.openjdk.java.net/browse/JDK-8212233
+dist: bionic
+
+# Remove the outdated OpenJDK 11.0.2 which Travis image grabbed from java.net 
in
+# 
https://github.com/travis-ci/travis-cookbooks/blob/master/cookbooks/travis_jdk/files/install-jdk.sh#L200
+# (which has 11.0.2 hard-coded!), and instead replace it with the latest 
openjdk-11-jdk-headless Ubuntu package.
+# NB /usr/local/lib/jvm/openjdk11/bin is also on the PATH, but there's no need 
to change it (because we rm -rf anyway)
+before_install:
+  - echo $JAVA_HOME
+  - which java
+  - sudo rm -rf /usr/local/lib/jvm/
+  - sudo apt-get install -y openjdk-11-jdk-headless
+  - export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
+  - which java
+  - java -version
+  - $JAVA_HOME/bin/java -version
+  
 jdk:
   - openjdk8
   - openjdk11

Reply via email to