Function: cider-jar-find-or-fetch
cider-jar-find-or-fetch is a byte-compiled function defined in
cider-jar.el.
Signature
(cider-jar-find-or-fetch GROUP ARTIFACT VERSION)
Documentation
Download the given jar off clojars and cache it.
GROUP, ARTIFACT, and VERSION are the components of the Maven coordinates. Returns the path to the jar.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-jar.el
(defun cider-jar-find-or-fetch (group artifact version)
"Download the given jar off clojars and cache it.
GROUP, ARTIFACT, and VERSION are the components of the Maven coordinates.
Returns the path to the jar."
(let* ((m2-path (expand-file-name (concat "~/.m2/repository/" group "/" artifact "/" version "/" artifact "-" version ".jar")))
(clojars-url (cider-jar-clojars-url group artifact version))
(cache-path (expand-file-name (replace-regexp-in-string "https://" "" clojars-url) cider-jar-cache-dir)))
(cond
((file-exists-p m2-path) m2-path)
((file-exists-p cache-path) cache-path)
(t
(make-directory (file-name-directory cache-path) t)
(url-copy-file clojars-url cache-path)
cache-path))))