Skip to content

[SPARK-56675][BUILD] Make sbt publishLocal work#55624

Open
sarutak wants to merge 1 commit intoapache:masterfrom
sarutak:publishLocal-work
Open

[SPARK-56675][BUILD] Make sbt publishLocal work#55624
sarutak wants to merge 1 commit intoapache:masterfrom
sarutak:publishLocal-work

Conversation

@sarutak
Copy link
Copy Markdown
Member

@sarutak sarutak commented Apr 30, 2026

What changes were proposed in this pull request?

This PR fixes an issue that sbt publishLocal doesn't work.
The reason is that packageDoc/publishArtifact doesn't work (so sbt doc also doesn't work).
In the Spark community, API documents are generated using unidoc and I feel having API documents in ~/.m2 or ~/.ivy2 is not so useful.
So, the solution is publishing API documents by packageDoc / publishArtifact := false.
In addition, this PR allows developers to configure whether to publish source JARs by an environment variable PUBLISH_PACKAGE_SRC. The default value is false, which is the same behavior as mvn install.

Why are the changes needed?

Having artifacts in ~/.m2 or ~.ivy2 is useful for downstream developers

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Confirmed artifacts are in both ~/.m2 and ~/.ivy2 by the following command.

$ build/sbt publishLocal

Also confirmed *-sources.jar are in both ~/.m2 and ~/.ivy2 by the following command.

$ PUBLISH_PACKAGE_SRC=1 build/sbt publishLocal

Was this patch authored or co-authored using generative AI tooling?

No.

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.

1 participant