Skip to content
Latchkey

Clojure Leiningen "Could not find artifact" in CI

Leiningen queried Clojars and Maven Central for a dependency and none returned a matching artifact. It reports "Could not find artifact <group>:<name>:jar:<version>" with the repositories it searched.

What this error means

lein deps or a build fails with "Could not find artifact X:Y:jar:Z in central (...)" and "in clojars (...)", naming the coordinate it could not download.

clojure
Could not find artifact cheshire:cheshire:jar:9.9.9 in central
(https://repo1.maven.org/maven2/)
Could not find artifact cheshire:cheshire:jar:9.9.9 in clojars
(https://repo.clojars.org/)

Common causes

The coordinate or version does not exist

A typo in the group/name or a version that was never published means no repository has the JAR.

A repository hosting the artifact is not configured

The dependency lives in a repository not listed in :repositories, so lein never searches where it exists.

How to fix it

Correct the dependency coordinate

  1. Read the group, name, and version in the error.
  2. Confirm the artifact exists and fix the coordinate in project.clj.
  3. Re-run lein deps so it resolves.
project.clj
:dependencies [[cheshire "5.13.0"]]

Add the repository that hosts it

Declare the extra repository so lein searches where the artifact actually lives.

project.clj
:repositories [["internal" {:url "https://maven.internal.example.com/releases"}]]

How to prevent it

  • Pin only versions confirmed published on Clojars or Central.
  • Declare extra :repositories for private artifacts.
  • Run lein deps locally before pushing so missing artifacts surface.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →