From c9ec3ae63c6960a2033406b27cb3becaf540415a Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 27 Apr 2019 16:22:21 +0200 Subject: [PATCH] Use openjdk 11.0.3 --- .travis.yml | 6 ++---- .travis/install-openjdk.sh | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .travis/install-openjdk.sh diff --git a/.travis.yml b/.travis.yml index 8a289d5c6b..d9d873b479 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,14 +39,12 @@ matrix: env: BUILD=deploy before_install: - - wget https://github.com/sormuras/bach/raw/master/install-jdk.sh - bash .travis/setup-secrets.sh - bash .travis/configure-maven.sh - rvm install 2.4.1 - rvm use 2.4.1 -# Install OpenJDK 11 - see https://sormuras.github.io/blog/2018-03-20-jdk-matrix.html install: - - . ./install-jdk.sh -F 12 -L GPL -W $HOME/jdk + - . .travis/install-openjdk.sh - gem install bundler - bundle install --with=release_notes_preprocessing --path=vendor/bundle before_script: true @@ -85,8 +83,8 @@ notifications: cache: directories: - "$HOME/.m2" + - "$HOME/.cache" - vendor/bundle - - "$HOME/jdk" - "$HOME/.rvm/" # Secure Keys, that need to be set for snapshot builds diff --git a/.travis/install-openjdk.sh b/.travis/install-openjdk.sh new file mode 100644 index 0000000000..87a51d1b38 --- /dev/null +++ b/.travis/install-openjdk.sh @@ -0,0 +1,14 @@ +OPENJDK_ARCHIVE=OpenJDK11U-x64_linux_11.0.3_7.tar.gz +DOWNLOAD_URL=https://pmd-code.org/${OPENJDK_ARCHIVE} +LOCAL_DIR=${HOME}/.cache/openjdk +TARGET_DIR=${HOME}/openjdk11 + +mkdir -p ${LOCAL_DIR} +mkdir -p ${TARGET_DIR} +wget --quiet --directory-prefix ${LOCAL_DIR} --timestamping --continue ${DOWNLOAD_URL} +tar --extract --file ${LOCAL_DIR}/${OPENJDK_ARCHIVE} -C ${TARGET_DIR} --strip-components 1 + +export JAVA_HOME=${TARGET_DIR} +export PATH=${JAVA_HOME}/bin:$PATH + +java -version