Scala sbt "ResolveException: unresolved dependency" in CI
sbt asked its configured resolvers for a module and none returned a matching artifact. It raises sbt.librarymanagement.ResolveException and lists the organization, name, and revision it could not download.
What this error means
sbt update or compile stops with "[error] sbt.librarymanagement.ResolveException: Error downloading <org>:<name>:<rev>" and "unresolved dependency" lines naming the coordinates.
[error] sbt.librarymanagement.ResolveException: Error downloading com.example:widgets_2.13:1.4.0
[error] Not found
[error] not found: https://repo1.maven.org/maven2/com/example/widgets_2.13/1.4.0/widgets_2.13-1.4.0.pom
[error] Total time: 6 s, completedCommon causes
The coordinates or revision do not exist
A typo in the organization/name, or a version that was never published, means no resolver has a matching POM or JAR.
A private repository is not configured in CI
The module lives in a private Maven repo whose resolvers or credentials are present locally but missing in the CI environment.
How to fix it
Verify the exact coordinates
- Read the "not found" URL to see the org, name, and revision sbt tried.
- Confirm the artifact and version exist on the index (note the Scala suffix like
_2.13). - Correct the
libraryDependenciesline and re-runsbt update.
libraryDependencies += "com.example" %% "widgets" % "1.4.0"Add the private resolver and credentials
Declare the repository and inject credentials from a CI secret so the resolver can reach private modules.
resolvers += "internal" at "https://maven.internal.example.com/releases"
credentials += Credentials("Internal", "maven.internal.example.com",
sys.env("MVN_USER"), sys.env("MVN_TOKEN"))How to prevent it
- Pin only versions you have confirmed are published.
- Keep private resolvers and credentials defined for CI, not just local machines.
- Use
%%so the correct Scala binary suffix is appended automatically.