Search code examples
clojureleiningenclojure-java-interop

How do you configure proprietary dependencies for Leiningen?


We're working on a project that has some Clojure-Java interop. At this point we have a single class that has a variety of dependencies which we put into a user library in Eclipse for development, but of course that doesn't help when using Leiningen (2.x). Most of our dependencies are proprietary, so they aren't on a repository somewhere.

What is the easiest/right way to do this?

I've seen leiningen - how to add dependencies for local jars?, but it appears to be out of date?

Update: So I made a local maven repository for my jar following these instructions and the lein deployment docs on github, and edited my project.clj file like this:

:dependencies [[...]
               [usc "0.1.0"]]
:repositories {"usc" "file://maven_repository"}

Where maven_repository is under the project directory (hence not using file:///). When I ran "lein deps"--I got this message:

Retrieving usc/usc/0.1.0/usc-0.1.0.pom from usc
Could not transfer artifact usc:usc:pom:0.1.0 from/to usc (file://maven_repository): no supported algorithms found
This could be due to a typo in :dependencies or network issues.
Could not resolve dependencies

What is meant by "no supported algorithms found" and how do I fix it?

Update2: Found the last bit of the answer here.


Solution

  • add them as a dependency to your leiningen project. You can make up the names and versions. then run lein deps and the error message when it fails to find it will give you the exact command to run so you can install the jar to your local repo then sould you decide to use a shared repo you can use this same process to put your dependencies there.