Skip to content

Commit bf92a3b

Browse files
committed
[ci] Update openjdk to 11.0.6
1 parent 0020756 commit bf92a3b

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.travis/install-openjdk.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
#
2-
# AdoptOpenJDK Builds from:
3-
# https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.4%2B11
2+
# OpenJDK by AdoptOpenJDK (https://adoptopenjdk.net/)
43
#
54

6-
DOWNLOAD_URL=https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz
5+
# VERSION_TAG e.g. "11.0.4+11" or "13+33"
6+
VERSION_TAG=11.0.6+10
7+
OPENJDK_MAJOR=${VERSION_TAG/.*/}
8+
OPENJDK_MAJOR=${OPENJDK_MAJOR/+*/}
9+
#BASE_URL=https://github.com/AdoptOpenJDK/openjdk${OPENJDK_MAJOR}-binaries/releases/download
10+
BASE_URL=https://pmd-code.org/openjdk
11+
12+
13+
DOWNLOAD_URL=${BASE_URL}/jdk-${VERSION_TAG/+/%2B}/OpenJDK${OPENJDK_MAJOR}U-jdk_x64_linux_hotspot_${VERSION_TAG/+/_}.tar.gz
14+
COMPONENTS_TO_STRIP=1 # e.g. openjdk-11.0.3+7/bin/java
15+
716
OPENJDK_ARCHIVE=$(basename $DOWNLOAD_URL)
817

918
LOCAL_DIR=${HOME}/.cache/openjdk
1019
TARGET_DIR=${HOME}/openjdk11
1120

1221
mkdir -p ${LOCAL_DIR}
1322
mkdir -p ${TARGET_DIR}
14-
wget --quiet --directory-prefix ${LOCAL_DIR} --timestamping --continue ${DOWNLOAD_URL}
15-
tar --extract --file ${LOCAL_DIR}/${OPENJDK_ARCHIVE} -C ${TARGET_DIR} --strip-components 1
23+
wget --directory-prefix ${LOCAL_DIR} --timestamping --continue ${DOWNLOAD_URL}
24+
tar --extract --file ${LOCAL_DIR}/${OPENJDK_ARCHIVE} -C ${TARGET_DIR} --strip-components=${COMPONENTS_TO_STRIP}
1625

1726
export JAVA_HOME=${TARGET_DIR}
1827
export PATH=${JAVA_HOME}/bin:$PATH

0 commit comments

Comments
 (0)