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/09/29 04:17:57 UTC

[orc] branch branch-1.7 updated: ORC-1011: Activate `java17` profile automatically (#920)

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

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


The following commit(s) were added to refs/heads/branch-1.7 by this push:
     new 92cd4ee  ORC-1011: Activate `java17` profile automatically (#920)
92cd4ee is described below

commit 92cd4ee86d250df637f410dfa54463faa1fa8e01
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Tue Sep 28 20:41:53 2021 -0700

    ORC-1011: Activate `java17` profile automatically (#920)
    
    ### What changes were proposed in this pull request?
    
    This PR aims to activate `java17` profile automatically on Java17 runtime.
    
    ### Why are the changes needed?
    
    This simplifies the development environment.
    
    ### How was this patch tested?
    
    Pass CIs with the revised configuration.
---
 java/CMakeLists.txt    | 4 +---
 java/core/pom.xml      | 3 +++
 java/mapreduce/pom.xml | 3 +++
 java/pom.xml           | 5 ++++-
 java/shims/pom.xml     | 3 +++
 java/tools/pom.xml     | 3 +++
 6 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index e9b1b4e..176be7e 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -45,8 +45,6 @@ execute_process(
   OUTPUT_QUIET
   ERROR_QUIET)
 if(RET EQUAL 0)
-  set(JAVA_PROFILE ${JAVA_PROFILE},java17)
-  set(JAVA_TEST_PROFILE -Pcmake,java17)
   set(ADD_OPENS --add-opens)
   set(JAVA_NIO java.base/java.nio=ALL-UNNAMED)
 endif()
@@ -63,7 +61,7 @@ add_custom_target(java_build ALL DEPENDS ${ORC_JARS})
 
 add_test(
   NAME java-test
-  COMMAND ./mvnw ${NO_DOWNLOAD_MSG} ${JAVA_TEST_PROFILE}
+  COMMAND ./mvnw ${NO_DOWNLOAD_MSG} -Pcmake
            -Dbuild.dir=${CMAKE_CURRENT_BINARY_DIR} test
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
 
diff --git a/java/core/pom.xml b/java/core/pom.xml
index 4355393..ec58be1 100644
--- a/java/core/pom.xml
+++ b/java/core/pom.xml
@@ -170,6 +170,9 @@
     </profile>
     <profile>
       <id>java17</id>
+      <activation>
+        <jdk>[17,)</jdk>
+      </activation>
       <dependencies>
         <dependency>
           <groupId>org.apache.hadoop</groupId>
diff --git a/java/mapreduce/pom.xml b/java/mapreduce/pom.xml
index bc3942c..61d24cb 100644
--- a/java/mapreduce/pom.xml
+++ b/java/mapreduce/pom.xml
@@ -147,6 +147,9 @@
     </profile>
     <profile>
       <id>java17</id>
+      <activation>
+        <jdk>[17,)</jdk>
+      </activation>
       <dependencies>
         <dependency>
           <groupId>org.apache.hadoop</groupId>
diff --git a/java/pom.xml b/java/pom.xml
index db3f116..041cc51 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -174,7 +174,7 @@
         <configuration>
           <trimStackTrace>false</trimStackTrace>
           <reuseForks>false</reuseForks>
-          <argLine>-Xmx2048m</argLine>
+          <argLine>-Xmx2048m -XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.nio=ALL-UNNAMED</argLine>
           <environmentVariables>
             <TZ>US/Pacific</TZ>
             <LANG>en_US.UTF-8</LANG>
@@ -502,6 +502,9 @@
     </profile>
     <profile>
       <id>java17</id>
+      <activation>
+        <jdk>[17,)</jdk>
+      </activation>
       <properties>
         <min.hadoop.version>3.3.1</min.hadoop.version>
         <hadoop.version>3.3.1</hadoop.version>
diff --git a/java/shims/pom.xml b/java/shims/pom.xml
index 6d2d155..addf167 100644
--- a/java/shims/pom.xml
+++ b/java/shims/pom.xml
@@ -106,6 +106,9 @@
     </profile>
     <profile>
       <id>java17</id>
+      <activation>
+        <jdk>[17,)</jdk>
+      </activation>
       <dependencies>
         <dependency>
           <groupId>org.apache.hadoop</groupId>
diff --git a/java/tools/pom.xml b/java/tools/pom.xml
index ae6945b..7e8d72a 100644
--- a/java/tools/pom.xml
+++ b/java/tools/pom.xml
@@ -169,6 +169,9 @@
     </profile>
     <profile>
       <id>java17</id>
+      <activation>
+        <jdk>[17,)</jdk>
+      </activation>
       <dependencies>
         <dependency>
           <groupId>org.apache.hadoop</groupId>