You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build.sbt: Resolver.mavenLocal makes the sbt build fragile to stale ~/.m2 cache state #1874
build.sbt adds Resolver.mavenLocal in commonSettings (build.sbt:76), applied broadly across modules including hadoop and spark.
This makes build/sbt compile fragile to the state of the machine's ~/.m2/repository, which is not a transactional download cache the way coursier's or Ivy's caches are. Plain Maven (or an IDE indexing dependencies, or an interrupted/Ctrl+C'd download) can leave a .pom file cached locally without the corresponding .jar. Once that happens, sbt/coursier resolves that module's metadata from mavenLocal and does not fall back to Maven Central for the actual jar — it fails the build with a NotFound fetch error, e.g.:
[error] lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] file:/Users/x/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar: not found: ...
This is unrelated to the actual dependency being genuinely available (Maven Central serves it fine) — it's purely an artifact of ~/.m2 state accumulated by unrelated tools/projects over time, yet it breaks the Unity Catalog build.
On one dev machine, this surfaced as 176 artifacts across the whole ~/.m2 cache having POM-only entries (no jar), which repeatedly broke hadoop and spark module compilation until manually repaired by re-fetching the missing jars from Maven Central.
Request
Investigate why Resolver.mavenLocal is needed (likely so hadoop/spark connector modules can pick up locally publishLocal'd Unity Catalog artifacts during development) and consider:
Removing it if it's not actually required for the default compile/test/package tasks, or
Scoping it to a narrower/opt-in context (e.g. only active under a local-dev sbt profile or a specific task) instead of applying it to commonSettings broadly, or
At minimum, documenting the fragility in CONTRIBUTING.md / README build section so contributors know how to diagnose a FetchError$DownloadingArtifacts failure against ~/.m2 quickly (find POM-only entries, re-download the missing jar).
Environment
Unity Catalog v0.6.0 branch
build/sbt clean compile
macOS, local ~/.m2/repository shared across multiple unrelated projects/IDEs over time
Activity
jaceklaskowski commentedon Sep 13, 2026
This is a script to clean up
~/.m2from orphaned POMs:Run this occasionally, or after any interrupted build, and re-fetch what it lists.
[Build] Prevent Maven local from affecting default sbt builds (unityc…