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
This commit is contained in:
Michael Vorburger
2020-05-10 15:04:26 +02:00
committed by Michael Vorburger ⛑️
parent 00b3687f95
commit d2d013b78f
+16 -6
View File
@@ -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`;'