[SPARK-56338][INFRA] Support Maven mirrors for build#55168
Closed
gaogaotiantian wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-56338][INFRA] Support Maven mirrors for build#55168gaogaotiantian wants to merge 1 commit intoapache:masterfrom
gaogaotiantian wants to merge 1 commit intoapache:masterfrom
Conversation
zhengruifeng
approved these changes
Apr 3, 2026
Contributor
|
merged to master |
cloud-fan
added a commit
that referenced
this pull request
Apr 9, 2026
…er bootstrap ### What changes were proposed in this pull request? This is a follow-up to #55168. The SBT launcher script (`build/sbt-launch-lib.bash`) did not respect `MAVEN_MIRROR_URL`. This patch adds support for it in two places: 1. **Launcher JAR download**: `MAVEN_MIRROR_URL` is used as the default for `DEFAULT_ARTIFACT_REPOSITORY` when neither is explicitly set. 2. **SBT boot phase**: When `MAVEN_MIRROR_URL` is set, a temporary SBT repositories config is generated and passed via `-Dsbt.repository.config` so SBT resolves itself and Scala through the mirror. ### Why are the changes needed? SPARK-56338 added `MAVEN_MIRROR_URL` support for Maven (`pom.xml`) and SBT project builds (`SparkBuild.scala`), but the SBT launcher script was not covered. In environments where default Maven repositories are unreachable, the SBT launcher JAR download and boot phase still fail without manual configuration (e.g. `~/.sbt/repositories`). ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually tested by setting `MAVEN_MIRROR_URL` and building Spark with SBT from scratch (launcher JAR removed, no `~/.sbt/repositories`). ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code Closes #55238 from cloud-fan/spark-56338-sbt-mirror. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
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?
Support Maven mirrors when building Spark. Users can define an environment variable
MAVEN_MIRROR_URLto use a mirror site for Maven packages.Why are the changes needed?
It provides flexibility for users to direct the build system to a mirror/proxy site when the default ones are not available for networking reasons (unstable connection, access restriction etc).
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Locally tested with a mirror site.
Was this patch authored or co-authored using generative AI tooling?
No.