Skip to content

Add Automatic Module Names for Java packages#12114

Merged
trivialfis merged 4 commits intodmlc:masterfrom
carl-mastrangelo:automodule
Mar 30, 2026
Merged

Add Automatic Module Names for Java packages#12114
trivialfis merged 4 commits intodmlc:masterfrom
carl-mastrangelo:automodule

Conversation

@carl-mastrangelo
Copy link
Copy Markdown
Contributor

This allows using XGBoost in Modular (Java 9+) projects

Fixes #11792

This allows using XGBoost in Modular (Java 9+) projects

Fixes #11792
@trivialfis
Copy link
Copy Markdown
Member

cc @wbo4958

@wbo4958
Copy link
Copy Markdown
Contributor

wbo4958 commented Mar 23, 2026

Thx @carl-mastrangelo, Can you also add it support for xgboost4j-spark-gpu module?

@carl-mastrangelo
Copy link
Copy Markdown
Contributor Author

@wbo4958 Done. Just a heads up, I manually tested the other three Jars, but since the Spark GPU is using shading, it's not exactly clear what the module would be, or if it should be shaded as well.

Also, since I don't have an Nvidia card, I wasn't able to run the tests.

<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>ml.dmlc.xgboost4j.sparkgpu</Automatic-Module-Name>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about "ml.dmlc.xgboost4j.spark" ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid that would conflict with the other spark module. My understanding is they need to be unique.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about ml.dmlc.xgboost4j.spark.gpu ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. PTAL.

@carl-mastrangelo
Copy link
Copy Markdown
Contributor Author

@wbo4958 Any other feedback?

@wbo4958
Copy link
Copy Markdown
Contributor

wbo4958 commented Mar 30, 2026

LGTM. Thx for your PR.

Comment thread jvm-packages/xgboost4j/pom.xml Outdated
@trivialfis trivialfis merged commit 36d4a0b into dmlc:master Mar 30, 2026
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[jvm] Add an Automatic Module Name for XGBoost

3 participants