I have one Clojure project named Parallel depending on another Clojure project named Messaging which I have used lein jar
command to generate the messaging-0.1.0-SNAPSHOT.jar file, then I followed the instructions on the page https://github.com/kumarshantanu/lein-localrepo to try to add local jar dependencies to Parallel project.
Firstly, I made a directory named lib under the root directory of the Parallel project. Then, I used command lein localrepo coords messaging-0.1.0-SNAPSHOT.jar | xargs lein localrepo install -r lib
to install the messaging library to the local repository lib. Thirdly, I added the dependency to the project.clj file of the Parallel project as below:
(defproject parallel "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.5.1"]
[...]
[messaging "0.1.0-SNAPSHOT"]]
:plugins [[lein-localrepo "0.5.2"]]
:repositories {"local" ~(str (.toURI (java.io.File. "lib")))})
Finally, however, when I run lein deps
, I got the following errors:
Retrieving messaging/messaging/0.1.0-SNAPSHOT/messaging-0.1.0-SNAPSHOT.pom from local
Could not transfer artifact messaging:messaging:pom:0.1.0-SNAPSHOT from/to local (file:/home/mixi/Workspace/Projects/clojure/parallel/lib/): no supported algorithms found
This could be due to a typo in :dependencies or network issues.
I couldn't figure out why. I have did some research on this issue, like Using local jars with Leiningen and How do you configure proprietary dependencies for Leiningen?, but I still couldn't find a way out.
So what's the right way to do it?