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

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


The following commit(s) were added to refs/heads/branch-1.9 by this push:
     new 86ac15194 ORC-1444: Enforce JDK Bytecode version
86ac15194 is described below

commit 86ac151945298889c2db29cf037e6fdfca81d356
Author: William Hyun <[email protected]>
AuthorDate: Thu Jun 15 11:00:11 2023 -0700

    ORC-1444: Enforce JDK Bytecode version
    
    This PR aims to enforce the JDK Bytecode version.
    At this moment it is enforced to 1.8, however, we will be able to move it 
up later.
    
    This feature helps us prevent accidental addition of a higher JDK library.
    
    Pass the CIs.
    
    Closes #1536 from williamhyun/bytecode.
    
    Authored-by: William Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    (cherry picked from commit 2357c17f58d4d84427e9272ee2a11655a2ab6807)
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 java/pom.xml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/java/pom.xml b/java/pom.xml
index b12fc1a0d..0eeb56348 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -801,6 +801,13 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-enforcer-plugin</artifactId>
         <version>3.3.0</version>
+        <dependencies>
+          <dependency>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>extra-enforcer-rules</artifactId>
+            <version>1.7.0</version>
+          </dependency>
+        </dependencies>
         <executions>
           <execution>
             <id>enforce-maven</id>
@@ -815,6 +822,14 @@
                 <requireJavaVersion>
                   <version>${java.version}</version>
                 </requireJavaVersion>
+                <enforceBytecodeVersion>
+                  <maxJdkVersion>${java.version}</maxJdkVersion>
+                  <ignoredScopes>test</ignoredScopes>
+                  <ignoredScopes>provided</ignoredScopes>
+                  <excludes>
+                    <exclude>org.threeten:threeten-extra</exclude>
+                  </excludes>
+                </enforceBytecodeVersion>
               </rules>
             </configuration>
           </execution>

Reply via email to