1

I am asking this question to straighten out a confusion I have about project.clj :dependencies and modules specified using :use/:require.

I use lein to build. I want to write a Clojure project and perhaps other than its being dependent on a particular Clojure release, do not want the project to be dependent on any module's particular version.

For example:

(defproject bene-csv "1.0.0-SN"
  :description "A csv parsing library"
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [clojure-csv/clojure-csv "1.3.2"]])

I don't particularly need to be dependent on clojure-csv 1.3.2. My code will will work with whatever version there is.

Am I required to specify a dependency so a version is fetched locally?

If not, what other mechanisms are there to get the modules I need and where would they be located?

Thank You.

octopusgrabbus
  • 9,974
  • 12
  • 59
  • 115

2 Answers2

4

I believe leiningen uses the same versioning system as maven. See Keeping dependency versions up to date in Leiningen projects and How do I tell Maven to use the latest version of a dependency?.

Community
  • 1
  • 1
deong
  • 3,672
  • 19
  • 18
4

Telling Leiningen "just pull in whatever version you like; I don't care" is just asking for trouble down the road. Repeatability the foundation of automation: https://github.com/technomancy/leiningen/wiki/Repeatability

  • Thanks. I've come to the same conclusion over time. It's better to go with a given version and then upgrade and test as new versions come along. – octopusgrabbus Mar 29 '12 at 17:10