You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ch...@apache.org on 2026/03/25 11:28:32 UTC

(spark) branch master updated: [SPARK-56003][BUILD] Use Nisse as plugin and bump it to 0.7.0

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

chengpan 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 1a65e5bf193e [SPARK-56003][BUILD] Use Nisse as plugin and bump it to 0.7.0
1a65e5bf193e is described below

commit 1a65e5bf193e2e945af78383895b2ad13c98b8ad
Author: Xiang LI <wa...@gmail.com>
AuthorDate: Wed Mar 25 19:28:13 2026 +0800

    [SPARK-56003][BUILD] Use Nisse as plugin and bump it to 0.7.0
    
    ### What changes were proposed in this pull request?
    1. Use [Nisse](https://github.com/maveniverse/nisse) as plugin instead of extension, to make IntelliJ's importer work
    2. Bump Nisse to its latest 0.7.0, from 0.4.6
    
    ### Why are the changes needed?
    Nisse is introduced by [SPARK-52652](https://github.com/apache/spark/pull/51350/) to replace unmaintained os-maven-plugin, in which Nisse is used as extension.
    
    Maven CLI works correctly with that change, but it seems IntelliJ has something wrong: some functions provided by Maven tool window (using so-called `IDE Maven importer`) has warnings or fails eventually. For example:
    - `Sync/Reload All Maven Projects`: succeed but with a lot of warnings `[WARNING] NisseModelVersionProcessor.overwriteModelProperties: failed, called out of session?`, which indicates Nisse as os-detector performs "illegal" action of modifying the read-only session.
    - `Generate Sources and Update Folders For All Projects`: fail with some artifacts being missing. And it is due to `os.detected.classifier` is not correctly interpolated. Nisse is in charge of that.
    
    The re-producing steps are recorded in [a Nisse issue](https://github.com/maveniverse/nisse/issues/138#issuecomment-3991125761).
    
    As the PR proposed, instead of extension, Nisse is changed to be used as plugin, and it makes both Maven CLI and IntelliJ work (no warning and code is generated correctly).
    Being used as plugin provides limited functions (only to provide properties for interpolation within a project), when [comparing to being used as extension](https://github.com/maveniverse/nisse/issues/138#issuecomment-3997658091). But luckily, it is enough here.
    
    [IDEA-386604](https://youtrack.jetbrains.com/issue/IDEA-386604/Maven-plugin-does-not-work-with-Nisse-used-an-extension) is also filed to JetBrains, and it appears to me that the `IDE Maven importer` provided by IntelliJ's [Maven plugin (and its Maven tool window)](https://plugins.jetbrains.com/plugin/27164-maven) works differently from Maven CLI, or even has something wrong when working with Nisse as extension. And since the issue is being processed somehow slowly, it might be better  [...]
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    - CLI
      - `build/mvn -Phive -Phive-thriftserver -Pyarn -DskipTests clean install`
      - `build/sbt -Phive -Phive-thriftserver -Pyarn clean compile package` (SBT were also tested although I do not think it is quite related to this fix)
    - IDE IntelliJ
      - `Sync/Reload All Maven Projects` and `Generate Sources and Update Folders For All Projects` in IntelliJ's Maven tool window
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No.
    
    ### Declaration
    The proposal is originally provided by [cstamas](https://github.com/cstamas). It is my honor to [have his agreement](https://github.com/maveniverse/nisse/issues/138#issuecomment-4033196363) to consolidate and share it in Spark.
    
    Closes #54825 from waterlx/nisse.
    
    Authored-by: Xiang LI <wa...@gmail.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .mvn/extensions.xml        | 24 ------------------------
 sql/connect/common/pom.xml | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 24 deletions(-)

diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
deleted file mode 100644
index da2aee8827a5..000000000000
--- a/.mvn/extensions.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<extensions>
-  <extension>
-    <groupId>eu.maveniverse.maven.nisse</groupId>
-    <artifactId>extension</artifactId>
-    <version>0.4.6</version>
-  </extension>
-</extensions>
diff --git a/sql/connect/common/pom.xml b/sql/connect/common/pom.xml
index 304a0aab14f5..7a502f103e3c 100644
--- a/sql/connect/common/pom.xml
+++ b/sql/connect/common/pom.xml
@@ -142,6 +142,20 @@
             </activation>
             <build>
                 <plugins>
+                    <plugin>
+                        <groupId>eu.maveniverse.maven.plugins</groupId>
+                        <artifactId>nisse-plugin3</artifactId>
+                        <version>0.7.0</version>
+                        <executions>
+                            <execution>
+                                <id>set-os-detector-properties</id>
+                                <goals>
+                                    <goal>inject-properties</goal>
+                                </goals>
+                                <phase>validate</phase>
+                            </execution>
+                        </executions>
+                    </plugin>
                     <!-- Add protobuf-maven-plugin and provide ScalaPB as a code generation plugin -->
                     <plugin>
                         <groupId>org.xolstice.maven.plugins</groupId>


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