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

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


The following commit(s) were added to refs/heads/main by this push:
     new b9641c621 ORC-1852: Add `--enable-native-access=ALL-UNNAMED` to 
suppress Maven warnings
b9641c621 is described below

commit b9641c6218a6ccb752822d18558e8cb8be4c8eec
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Sun Feb 16 11:18:18 2025 -0800

    ORC-1852: Add `--enable-native-access=ALL-UNNAMED` to suppress Maven 
warnings
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add `.mvn/jvm.config` to `java` directory in order to 
enable `--enable-native-access=ALL-UNNAMED` for Maven.
    
    ### Why are the changes needed?
    
    **Java 25-ea**
    ```
    $ java -version
    openjdk version "25-ea" 2025-09-16
    OpenJDK Runtime Environment (build 25-ea+10-1084)
    OpenJDK 64-Bit Server VM (build 25-ea+10-1084, mixed mode, sharing)
    ```
    
    **BEFORE**
    ```
    $ mvn clean | head -n1
    Running `/Users/dongjoon/APACHE/orc-merge/java/mvnw`...
    WARNING: A restricted method in java.lang.System has been called
    WARNING: java.lang.System::load has been called by 
org.fusesource.jansi.internal.JansiLoader in an unnamed module 
(file:/opt/homebrew/Cellar/maven/3.9.9/libexec/lib/jansi-2.4.1.jar)
    WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for 
callers in this module
    WARNING: Restricted methods will be blocked in a future release unless 
native access is enabled
    
    Using `mvn` from path: /opt/homebrew/bin/mvn
    WARNING: A restricted method in java.lang.System has been called
    WARNING: java.lang.System::load has been called by 
org.fusesource.jansi.internal.JansiLoader in an unnamed module 
(file:/opt/homebrew/Cellar/maven/3.9.9/libexec/lib/jansi-2.4.1.jar)
    WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for 
callers in this module
    WARNING: Restricted methods will be blocked in a future release unless 
native access is enabled
    ...
    ```
    
    **AFTER**
    ```
    $ mvn clean | head -n1
    Running `/Users/dongjoon/APACHE/orc-merge/java/mvnw`...
    Using `mvn` from path: /opt/homebrew/bin/mvn
    WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
    WARNING: sun.misc.Unsafe::objectFieldOffset has been called by 
com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper 
(file:/opt/homebrew/Cellar/maven/3.9.9/libexec/lib/guava-33.2.1-jre.jar)
    WARNING: Please consider reporting this to the maintainers of class 
com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper
    WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future 
release
    [INFO] Scanning for projects...
    ...
    ```
    
    ### How was this patch tested?
    
    Pass the CIs and manual testing.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #2131 from dongjoon-hyun/ORC-1852.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 java/.mvn/jvm.config | 1 +
 java/pom.xml         | 1 +
 2 files changed, 2 insertions(+)

diff --git a/java/.mvn/jvm.config b/java/.mvn/jvm.config
new file mode 100644
index 000000000..81b88d817
--- /dev/null
+++ b/java/.mvn/jvm.config
@@ -0,0 +1 @@
+--enable-native-access=ALL-UNNAMED
diff --git a/java/pom.xml b/java/pom.xml
index 0b4d68d5e..3c5de7bbe 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -431,6 +431,7 @@
               <exclude>.idea/**</exclude>
               <exclude>**/*.iml</exclude>
               <exclude>**/dependency-reduced-pom.xml</exclude>
+              <exclude>.mvn/jvm.config</exclude>
             </excludes>
           </configuration>
           <executions>

Reply via email to