Travis CI couldn't install openjdk11
It seems to be an TLS certificate error of download.java.net
.
Current TLS certificate exposed by download.java.net
is invalid: it's for download.oracle.com
.
The 51 return code was returned by the curl
download command.
You can download the install-jdk.sh
script :
curl -o /tmp/install-jdk.sh -L https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh
Then run it:
bash -x /tmp/install-jdk.sh --target "/home/travis/openjdk11" --workspace "/home/travis/.cache/install-jdk" --feature "11" --license "GPL" --cacerts
Failing command is:
curl -o /dev/null --silent --head --write-out '%{http_code}' https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_osx-x64_bin.tar.gz
with a 51 return code
To avoid this problem, try something like this in your .travis.yml
configuration file:
language: java
dist: xenial
sudo: required
jdk:
- openjdk11