[SPARK-52652][BUILD] Replace os-maven-plugin with nisse#51350
Closed
pan3793 wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-52652][BUILD] Replace os-maven-plugin with nisse#51350pan3793 wants to merge 2 commits intoapache:masterfrom
os-maven-plugin with nisse#51350pan3793 wants to merge 2 commits intoapache:masterfrom
Conversation
os-maven-plugin with nisse
.mvn/extensions.xml
Outdated
| ~ limitations under the License. | ||
| --> | ||
| <extensions> | ||
| <extension> |
Member
There was a problem hiding this comment.
We use 2-space indentation in pom.xml file.
dongjoon-hyun
approved these changes
Jul 2, 2025
Member
dongjoon-hyun
left a comment
There was a problem hiding this comment.
+1, LGTM (except one comment about indentation).
Member
|
Merged to master. Thank you, @pan3793 . |
Contributor
|
late LGTM |
pan3793
pushed a commit
that referenced
this pull request
Mar 25, 2026
### 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](#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](maveniverse/nisse#138 (comment)). 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](maveniverse/nisse#138 (comment)). 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 to make it work in Spark project firstly, while I will continue to watch that issue and probably change it back if there is a fix in IntelliJ. ### 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](maveniverse/nisse#138 (comment)) to consolidate and share it in Spark. Closes #54825 from waterlx/nisse. Authored-by: Xiang LI <waterlx@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Nisse provides drop-in-replacement for discontinued OS Detector plugin, the former works for both Maven 3 and 4, but the latter does not work for upcoming Maven 4.
https://maven.apache.org/docs/4.0.0-rc-3/release-notes.html
Why are the changes needed?
Prepare for Maven 4 support.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass GHA's Maven building.
Was this patch authored or co-authored using generative AI tooling?
No.