Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Travis CI couldn't install openjdk11

I have a problem with installing openjdk11 in Travis CI.

This is the error I'm getting

Installing openjdk11
$ export JAVA_HOME=~/openjdk11
$ export PATH="$JAVA_HOME/bin:$PATH"
$ ~/bin/install-jdk.sh --target "/home/travis/openjdk11" --workspace "/home/travis/.cache/install-jdk" --feature "11" --license "GPL" --cacerts
install-jdk.sh 2019-04-18
The command "~/bin/install-jdk.sh --target "/home/travis/openjdk11" --workspace "/home/travis/.cache/install-jdk" --feature "11" --license "GPL" --cacerts" failed and exited with 51 during .
Your build has been stopped.

.travis.yml file:

language: java
jdk: openjdk11
cache:
  directories:
    - "$HOME/.m2/repository"
like image 476
Sushmitha M Avatar asked Apr 27 '19 08:04

Sushmitha M


1 Answers

To avoid this problem, try something like this in your .travis.yml configuration file:

language: java
dist: xenial
sudo: required

jdk:
  - openjdk11
like image 196
Juliano Macedo Avatar answered Oct 03 '22 18:10

Juliano Macedo