You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2021/01/24 18:02:13 UTC

[orc] branch branch-1.6 updated: ORC-739: Use Maven Wrapper in java/CMakeLists.txt (#632)

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

dongjoon pushed a commit to branch branch-1.6
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/branch-1.6 by this push:
     new c1f779d  ORC-739: Use Maven Wrapper in java/CMakeLists.txt (#632)
c1f779d is described below

commit c1f779daa0f7e96f8c15ba39a693a60faf90cbe2
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Sun Jan 24 10:00:58 2021 -0800

    ORC-739: Use Maven Wrapper in java/CMakeLists.txt (#632)
    
    ### What changes were proposed in this pull request?
    
    This PR aims to replace `mvn` with `mvnw` in `java.CMakeLists.txt`.
    
    ### Why are the changes needed?
    
    Some old OSes like CentOS7 may have the old Maven installation. Maven Wrapper will prevent build and test failures.
    
    ### How was this patch tested?
    
    Pass the CIs and manually do the following.
    
    ```
    $ cd docker
    $ ./run-one.sh local ORC-739 centos7
    ...
    exec: curl --silent --show-error -L https://www.apache.org/dyn/closer.lua?action=download&filename=/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
    Using `mvn` from path: /root/orc/java/build/apache-maven-3.6.3/bin/mvn
    ...
    Using `mvn` from path: /root/orc/java/build/apache-maven-3.6.3/bin/mvn
    [INFO] Scanning for projects...
    ...
    Test project /root/build
        Start 1: orc-test
    1/3 Test #1: orc-test .........................   Passed    6.72 sec
        Start 2: java-test
    2/3 Test #2: java-test ........................   Passed  103.21 sec
        Start 3: tool-test
    3/3 Test #3: tool-test ........................   Passed   19.69 sec
    
    100% tests passed, 0 tests failed out of 3
    
    Total Test time (real) = 129.62 sec
    Built target test-out
    Finished centos7 at Fri Jan 22 06:33:19 PM PST 2021
    ```
    
    (cherry picked from commit f0c5f0039654faec3f09d2b63c14fa170cc13f15)
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 java/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index 5e85895..89837b8 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -15,7 +15,7 @@ set(NO_DOWNLOAD_MSG
   -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn)
 
 # set the version in the POM file to match the CMake version string
-execute_process(COMMAND mvn versions:set -DnewVersion=${ORC_VERSION}
+execute_process(COMMAND ./mvnw versions:set -DnewVersion=${ORC_VERSION}
                                          -DgenerateBackupPoms=false
                                          ${NO_DOWNLOAD_MSG}
                 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
@@ -39,7 +39,7 @@ endif()
 
 add_custom_command(
    OUTPUT ${ORC_JARS}
-   COMMAND mvn ${NO_DOWNLOAD_MSG} ${JAVA_PROFILE}
+   COMMAND ./mvnw ${NO_DOWNLOAD_MSG} ${JAVA_PROFILE}
              -Dbuild.dir=${CMAKE_CURRENT_BINARY_DIR} -DskipTests package
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    COMMENT "Build the java directory"
@@ -49,7 +49,7 @@ add_custom_target(java_build ALL DEPENDS ${ORC_JARS})
 
 add_test(
   NAME java-test
-  COMMAND mvn ${NO_DOWNLOAD_MSG} -Pcmake
+  COMMAND ./mvnw ${NO_DOWNLOAD_MSG} -Pcmake
            -Dbuild.dir=${CMAKE_CURRENT_BINARY_DIR} test
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})