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.
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
- Read the group, name, and version in the error.
- Confirm the artifact exists and fix the coordinate in
project.clj. - Re-run
lein depsso it resolves.
:dependencies [[cheshire "5.13.0"]]Add the repository that hosts it
Declare the extra repository so lein searches where the artifact actually lives.
:repositories [["internal" {:url "https://maven.internal.example.com/releases"}]]How to prevent it
- Pin only versions confirmed published on Clojars or Central.
- Declare extra
:repositoriesfor private artifacts. - Run
lein depslocally before pushing so missing artifacts surface.