Reputation: 5701
I realize that this question is pretty much the exact question found here. However, seeing as that question is 1.5 years old (or so), I would like to revisit it. How does one add local dependencies using leiningen? Surely this capability must exist by now?
Upvotes: 10
Views: 4913
Reputation: 498
I found that the easiest (albeit somewhat hacky) solution is to do the following:
For an existing project that you're using as a dependency:
lein deps
lein uberjar
in this dependency dir (where the relevant project.clj file lives)For development of your own project:
lein install
Again, this is a quick hack and perhaps not the way you'd go about doing serious local development, but I found it easy enough for what I wanted. Check out lein help tutorial
for much more info
Upvotes: 2
Reputation: 2831
If the jars are based on your own projects, you can use lein install
to put them into your local .m2, or use the checkout-dependencies feature.
You can also use the extra-classpaths feature, etc.
Upvotes: 7
Reputation: 32458
Create a private Maven Repository, and then, add the following to your project.clj
:repositories {"local" ~(str (.toURI (java.io.File. "your_local_repository")))}
Upvotes: 8