You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2023/06/20 15:22:41 UTC
[spark] branch master updated: [SPARK-44022][BUILD] Enforce max bytecode version on Maven dependencies
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 27e1e56d54b [SPARK-44022][BUILD] Enforce max bytecode version on Maven dependencies
27e1e56d54b is described below
commit 27e1e56d54b1c6986369469b27774fa7bc267cf4
Author: liangbowen <li...@gf.com.cn>
AuthorDate: Tue Jun 20 08:22:30 2023 -0700
[SPARK-44022][BUILD] Enforce max bytecode version on Maven dependencies
### What changes were proposed in this pull request?
- to enforce Java's max bytecode version to maven dependencies, by using enforceBytecodeVersion enforcer rule (https://www.mojohaus.org/extra-enforcer-rules/enforceBytecodeVersion.html)
- exclude `org.threeten:threeten-extra` in enforcer rule as its package-info.class requiring bytecode version 53 but no side effects on other classes
### Why are the changes needed?
- to avoiding introduction of dependencies requiring higher Java version
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
Closes #41546 from bowenliang123/enforce-bytecode-version.
Authored-by: liangbowen <li...@gf.com.cn>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
pom.xml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/pom.xml b/pom.xml
index c322112fbc6..74f64da9fd3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2782,6 +2782,17 @@
</excludes>
<searchTransitive>true</searchTransitive>
</bannedDependencies>
+ <enforceBytecodeVersion>
+ <maxJdkVersion>${java.version}</maxJdkVersion>
+ <ignoredScopes>test</ignoredScopes>
+ <ignoredScopes>provided</ignoredScopes>
+ <excludes>
+ <!--
+ TODO(SPARK-44032): Remove the exclusion of threeten-extra when orc-core fixes the violation
+ -->
+ <exclude>org.threeten:threeten-extra</exclude>
+ </excludes>
+ </enforceBytecodeVersion>
</rules>
</configuration>
</execution>
@@ -2797,6 +2808,13 @@
</configuration>
</execution>
</executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>extra-enforcer-rules</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ </dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org