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 5faa512bf8c7 [SPARK-47075][BUILD] Add `derby-provided` profile
5faa512bf8c7 is described below

commit 5faa512bf8c7c268613220d93ae4733cdf734cd0
Author: Dongjoon Hyun <dh...@apple.com>
AuthorDate: Fri Feb 16 12:41:39 2024 -0800

    [SPARK-47075][BUILD] Add `derby-provided` profile
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add `derby-provided` profile.
    
    ### Why are the changes needed?
    
    To help the users add their custom Derby jar later.
    
    For the record, currently, Apache Spark 4.0 allows Java 21 and Derby 
10.17.1.0 combination build like the following.
    ```
    $ dev/make-distribution.sh -Phive -Dderby.version=10.17.1.0 
-Djava.version=21
    $ cd dist/jars
    $ ls derby*
    derby-10.17.1.0.jar       derbyshared-10.17.1.0.jar derbytools-10.17.1.0.jar
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, this is a new additional profile.
    
    ### How was this patch tested?
    
    Manual.
    
    ```
    $ dev/make-distribution.sh -Phive,derby-provided
    $ ls dist/jars/derby*
    zsh: no matches found: dist/jars/derby*
    ```
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #45138 from dongjoon-hyun/SPARK-47075.
    
    Authored-by: Dongjoon Hyun <dh...@apple.com>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 assembly/pom.xml | 6 ++++++
 pom.xml          | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/assembly/pom.xml b/assembly/pom.xml
index cd8c3fca9d23..2b0afafa04fc 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -250,6 +250,12 @@
     </profile>
 
     <!-- Profiles that disable inclusion of certain dependencies. -->
+    <profile>
+      <id>derby-provided</id>
+      <properties>
+        <derby.deps.scope>provided</derby.deps.scope>
+      </properties>
+    </profile>
     <profile>
       <id>hadoop-provided</id>
       <properties>
diff --git a/pom.xml b/pom.xml
index cd669dd02b6d..a14f2d255a90 100644
--- a/pom.xml
+++ b/pom.xml
@@ -266,6 +266,7 @@
       during compilation if the dependency is transitive (e.g. "graphx/" 
depending on "core/" and
       needing Hadoop classes in the classpath to compile).
     -->
+    <derby.deps.scope>compile</derby.deps.scope>
     <hadoop.deps.scope>compile</hadoop.deps.scope>
     <hive.deps.scope>compile</hive.deps.scope>
     <hive.storage.version>2.8.1</hive.storage.version>
@@ -936,11 +937,13 @@
         <groupId>org.apache.derby</groupId>
         <artifactId>derby</artifactId>
         <version>${derby.version}</version>
+        <scope>${derby.deps.scope}</scope>
       </dependency>
       <dependency>
         <groupId>org.apache.derby</groupId>
         <artifactId>derbytools</artifactId>
         <version>${derby.version}</version>
+        <scope>${derby.deps.scope}</scope>
       </dependency>
       <dependency>
         <groupId>io.dropwizard.metrics</groupId>
@@ -3759,6 +3762,9 @@
         <spark.yarn.isHadoopProvided>true</spark.yarn.isHadoopProvided>
       </properties>
     </profile>
+    <profile>
+      <id>derby-provided</id>
+    </profile>
     <profile>
       <id>hive-provided</id>
     </profile>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to