diff --git a/.travis.yml b/.travis.yml index 299466a..692453a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,11 +13,16 @@ env: - TRAVIS_JDK=1.11.0-3 - TRAVIS_JDK=openjdk@1.11.0-2 - TRAVIS_JDK=amazon-corretto@1.11.0-3.7.1 + # Default JDK of xenial + - TRAVIS_JDK= -before_install: curl -Ls https://git.io/jabba | bash && . ~/.jabba/jabba.sh +before_install: test -z "$TRAVIS_JDK" || (curl -Ls https://git.io/jabba | bash && . ~/.jabba/jabba.sh) install: - - jabba install "$TRAVIS_JDK" && jabba use $_ && java -Xmx32m -version + # Only install and use JDK if it is set. If empty, use system JDK. + - test -z "$TRAVIS_JDK" || (jabba install "$TRAVIS_JDK" && jabba use $_); + # Print the JDK we are going to use. + - java -Xmx32m -version # due to a bug, dependency resolve will try to resolve reactor projects from subfolders, although # excludeReactor=true is set. # - ./mvnw dependency:resolve dependency:resolve-plugins