When I deploy to clojars, should org.clojure/clojure be added or be removed to :dependencies?

137 Views Asked by At

When I deploy to clojars, should org.clojure/clojure be added or be removed in :dependencies in project.clj?

Which is better way?

1

There are 1 best solutions below

3
On

When you deploy a library to Clojars, you will be deploying a JAR file containing just the source of your own project, in general. The JAR file will not contain any of the dependencies in your project. Those will be specified in a pom.xml file that is also deployed to Clojars. That pom.xml file is auto-generated by Leiningen when it builds and deploys your JAR file to Clojars.

When other projects depend on your library, they will get the code from the JAR file and the accompanying pom.xml will tell them what other libraries are needed to use your code. Leiningen automatically downloads those other libraries, once it has downloaded your library from Clojars.

Since all such projects are going to require Clojure itself to run them, they will already have a dependency on Clojure -- so it won't matter whether your project indicates a dependency on Clojure or not.