Open joschi opened 3 years ago
Perhaps related to https://github.com/sormuras/bach/issues/72?
@sormuras The message is a different one and the --feature
seems to be checked before anything is being downloaded.
Ah, ok.
install-jdk.sh
shouldn't be called for JDK versions below 9 at all, and for 9 to 14 (as of today) only for non-production related tasks. See https://travis-ci.community/t/java-jdk-on-travis-ci/1380 for details.
install-jdk.sh
shouldn't be called for JDK versions below 9 at all, and for 9 to 14 (as of today) only for non-production related tasks.
That's something which Travis CI has to fix or make very clear that OpenJDK 8 is not supported on the Ubuntu Focal build environment out of the box. 😉
I understand that this is not working out of the box, but could someone point me to any working instructions on how to setup OpenJDK 8 on Focal. Nearly everything I've tried appears to be out-of-date documentation.
@hnarayanan You could install Zulu Community as described here: https://docs.azul.com/zulu/zuludocs/ZuluUserGuide/PrepareZuluPlatform/AttachAPTRepositoryUbuntuOrDebianSys.htm
Thank you. I went with a different approach and document the solution below in case it helps anyone. In the following example, I am trying to set up an older Java for an older elasticsearch. In .travis.yml
:
before_install:
- sudo apt-get install -y openjdk-8-jdk
before_script:
- echo JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | sudo tee -a /etc/default/elasticsearch
Alternatively you can just export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
or add it to your path before your scripts.
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues
According to the documentation about the Ubuntu 20.04 (Focal Fossa) Build Environment, it should come with OpenJDK 8 preinstalled:
https://docs.travis-ci.com/user/reference/focal/#jvm-clojure-groovy-java-scala-support https://github.com/travis-ci/docs-travis-ci-com/blame/f6814e6281e1036b6ca056b49106cabcdc74e77e/user/reference/focal.md#L137
Unfortunately this is incorrect and only OpenJDK 9 and later seem to be supported:
Source: https://travis-ci.com/github/dropwizard/dropwizard/jobs/403800987#L170-L174
There is also an unanswered topic in the Travis CI Community about this: https://travis-ci.community/t/openjdk8-setup-fails-on-focal/9760/2
Given that Java 8 is still in wide use, it would be great if support for OpenJDK 8 could be added to the Ubuntu 20.04 (Focal Fossa) Build Environment.