You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/06/02 18:32:44 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #2814] Set JAVA_HOME in travis via javac

This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 9265cf3e0 [KYUUBI #2814] Set JAVA_HOME in travis via javac
9265cf3e0 is described below

commit 9265cf3e03666b71514fa60ed23f743db32b4e68
Author: sychen <sy...@ctrip.com>
AuthorDate: Fri Jun 3 02:32:35 2022 +0800

    [KYUUBI #2814] Set JAVA_HOME in travis via javac
    
    ### _Why are the changes needed?_
    Now `JAVA_HOME` is hardcoded, travis changed the `openjdk8` installation package, so the path also changed.
    Now it is through `javac` to find the real java home directory.
    
    **fail now**
    https://app.travis-ci.com/github/apache/incubator-kyuubi/jobs/572250073
    
    ```
    update-alternatives: using /usr/lib/jvm/temurin-8-jdk-arm64/bin/appletviewer to provide /usr/bin/appletviewer (appletviewer) in auto mode
    ```
    
    **success before**
    https://app.travis-ci.com/github/apache/incubator-kyuubi/jobs/572180707
    
    ```
    update-alternatives: using /usr/lib/jvm/adoptopenjdk-8-hotspot-arm64/bin/appletviewer to provide /usr/bin/appletviewer (appletviewer) in auto mode
    ```
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #2814 from cxzl25/travis_java_home.
    
    Closes #2814
    
    fe8f16bf [sychen] travis java home
    
    Authored-by: sychen <sy...@ctrip.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index a92a02a3c..680dfb790 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -58,7 +58,7 @@ install:
   - ./build/mvn --version
 
 before_script:
-  - export JAVA_HOME="/usr/lib/jvm/adoptopenjdk-8-hotspot-arm64"
+  - export JAVA_HOME="$(realpath -Pm "$(which javac)/../../")"
   - export MVN_ARGS="-Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip -V -B -ntp -Dorg.slf4j.simpleLogger.defaultLogLevel=warn"
   - ./build/mvn clean install -DskipTests $MVN_ARGS