Leiningen "Could not find artifact ... in central/clojars" in CI
Leiningen asked every configured repository (central and clojars by default) for the coordinate and none of them has it. The version does not exist, the coordinate is misspelled, or the repository that hosts it is not configured.
What this error means
lein deps or lein test aborts while resolving dependencies with "Could not find artifact GROUP:ARTIFACT:VERSION in central" and the same line repeated for clojars.
Could not find artifact org.example/widgets:jar:9.9.9 in central (https://repo1.maven.org/maven2/)
Could not find artifact org.example/widgets:jar:9.9.9 in clojars (https://repo.clojars.org/)
This could be due to a typo in :dependencies, file system permissions, or network issues.Common causes
The version or coordinate does not exist
The [org.example/widgets "9.9.9"] entry in project.clj :dependencies names a version that was never published, or the group/artifact id is wrong.
The hosting repository is not configured
The artifact lives in a private or third-party Maven repo, but :repositories only lists central and clojars, so Leiningen never queries the right host.
How to fix it
Correct the coordinate to a published version
- Look up the real artifact on Clojars or Maven Central and copy the exact group/artifact/version.
- Update the
:dependenciesvector inproject.cljto match. - Run
lein depsto confirm the coordinate now resolves.
:dependencies [[org.clojure/clojure "1.11.1"]
[org.example/widgets "1.4.0"]]Add the repository that hosts the artifact
If the dependency is private, register its Maven repo so Leiningen queries it.
:repositories [["internal" {:url "https://maven.internal.example.com/repo"
:username :env/mvn_user
:password :env/mvn_pass}]]How to prevent it
- Pin dependencies to versions you have verified are published.
- Register private Maven repositories in
:repositoriesexplicitly. - Cache
~/.m2/repositoryin CI so a resolved coordinate is not re-fetched every run.