Issue: Fail to build jdk8 on osx using xcode9.3 image

Travis fails to install openjdk8 on osx:

Installing openjdk8

$ export JAVA_HOME=~/openjdk8

$ export PATH="$JAVA_HOME/bin:$PATH"

$ ~/bin/ --target "/Users/travis/openjdk8" --workspace "/Users/travis/.cache/install-jdk" --feature "8" --license "GPL" 2018-10-17

Expected feature release number in range of 9 to 12, but got: 8

The command "~/bin/ --target "/Users/travis/openjdk8" --workspace "/Users/travis/.cache/install-jdk" --feature "8" --license "GPL"" failed and exited with 3 during .

Job log:

Travis configuration:

Oracle JDK 10 download failing on Travis CI macOS · Issue #36 · sormuras/bach · GitHub says:

Oracle says: “Java SE 10 has reached end of support. Users of Java SE 10 should switch to Java SE 11.”

This apparently means that GitHub - sormuras/bach: 🎼 Bach Builds (on(ly)) Modules no longer supports JDK 8 because it’s going to be dropped from Oracle download servers. If that’s not so, file an issue or a PR in that project.

You may succeed if you provide a custom download URL with --url.

@native-api thank you for your reply.
Actually, we specified in our .travis.yml to use xcode9.3 image (which includes java8). And as far as I understand it fails somewhere inside the image build.
Is there any way have can I configure the --url parameter in the .travis.yml?

Oh, I see, it’s Travis’ logic. So it’s their problem…

…except that this is documented (emphasis mine), so this is actually by design:

To test against multiple JDKs, use the jdk: key in .travis.yml .


Note that testing against multiple Java versions is not supported on OS X. See the OS X Build Environment for more details.

Explicitly ignoring jdk: in build with a message or giving an error would be way better though than an obscure error. You can file a PR against GitHub - travis-ci/travis-build: .travis.yml => converter to fix the corresponding logic. Each documentation page also has an “Improve this page on Github” link you can use to fix the obsolete parts (e.g. as we saw only Java 9+ is supported in the jdk: clause).

1 Like