You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vo...@apache.org on 2020/05/10 13:04:32 UTC
[fineract] branch develop updated: use Java >11.0.2 instead of Java
12 on Travis (FINERACT-937)
This is an automated email from the ASF dual-hosted git repository.
vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new d2d013b use Java >11.0.2 instead of Java 12 on Travis (FINERACT-937)
d2d013b is described below
commit d2d013b78fc50596246707352659cae64a94bf85
Author: Michael Vorburger <mi...@vorburger.ch>
AuthorDate: Fri May 8 20:59:59 2020 +0200
use Java >11.0.2 instead of Java 12 on Travis (FINERACT-937)
by ditching Travis' own sad state of Java (cough) 'support'
and just re-installing it ourselves instead
---
.travis.yml | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index d882323..f3da52d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,14 +16,11 @@
# under the License.
#
-# https://issues.apache.org/jira/browse/FINERACT-763
+# https://docs.travis-ci.com/user/reference/linux/
+# Must use a fixed distribution (and remember to occassionally upgrade..)
+# to avoid surprise changes such as https://issues.apache.org/jira/browse/FINERACT-763
dist: bionic
-language: java
-
-jdk:
- - openjdk12
-
services:
- mysql
- docker
@@ -34,7 +31,20 @@ addons:
# https://httpie.org is used by the docker-compose test below
- httpie
+# See https://issues.apache.org/jira/browse/FINERACT-937 for background re. what below is all about..
+# We basically 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
- echo "USE mysql;\nALTER USER 'root'@'localhost' IDENTIFIED BY 'mysql';\n" | mysql -u root
- mysql -u root -pmysql -e 'CREATE DATABASE IF NOT EXISTS `fineract_tenants`;'
- mysql -u root -pmysql -e 'CREATE DATABASE IF NOT EXISTS `fineract_default`;'