Skip to content
Latchkey

sbt "ResolveException: Error downloading X: not found" in CI

sbt asked every configured resolver for the exact group, artifact, and version and none returned the file, so it reports "not found". The coordinates, the Scala cross-version suffix, or the missing repository is the problem, not the network.

What this error means

sbt update or compile stops with "sbt.librarymanagement.ResolveException: Error downloading org:artifact_2.13:version" followed by a "not found:" list of every URL it tried.

sbt
[error] sbt.librarymanagement.ResolveException: Error downloading com.example:mylib_2.13:1.4.0
[error]   not found: https://repo1.maven.org/maven2/com/example/mylib_2.13/1.4.0/mylib_2.13-1.4.0.pom
[error]   not found: /home/runner/.ivy2/local/com.example/mylib_2.13/1.4.0/ivys/ivy.xml

Common causes

The artifact is not published at those coordinates

A typo in the group or artifact name, a version that was never released, or a wrong Scala suffix (_2.13 vs _3) means no resolver hosts that exact file.

The hosting repository is not in resolvers

The library lives on a repository (Sonatype, a company Nexus, JitPack) that the build never adds to resolvers, so sbt only queries Maven Central and misses it.

How to fix it

Add the resolver that hosts the artifact

  1. Confirm the real coordinates and Scala suffix on the library page.
  2. Add the hosting repository to resolvers in build.sbt.
  3. Re-run sbt update and confirm the file downloads.
build.sbt
resolvers += "Sonatype Snapshots" at
  "https://s01.oss.sonatype.org/content/repositories/snapshots/"

Use %% so the Scala suffix is correct

For Scala libraries, %% appends the right cross-version suffix automatically instead of hardcoding _2.13.

build.sbt
libraryDependencies += "com.example" %% "mylib" % "1.4.0"

How to prevent it

  • Use %% for Scala artifacts so the cross-version suffix always matches your Scala version.
  • Declare every non-central resolver the build needs explicitly.
  • Cache ~/.ivy2 and ~/.coursier so resolved artifacts are not refetched each run.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →