murtaza52
murtaza52

Reputation: 47441

leiningen build failing due to repeatability error

I have been working from a while with lein2 and it has been working fine. However today trouble started, and whichever command I type with lein2 it gives me the below error. I tried deleting ~/.m2, and in that case it downloads the deps again but in the end gives me the same error.

I have also tried removing and again downloading lein2. Below is the error it gives -

Check :dependencies and :repositories for typos. It's possible the specified jar is not in any repository. If so, see "Free-floating Jars" under http://j.mp/repeatability Could not resolve dependencies

The error is occuring irrespective of the project or the folder. Below is my ~/.lein/profiles.clj -

{:user {:plugins [[lein-immutant "0.8.1"]
                  [lein-difftest "1.3.7"]
                  [lein-marginalia "0.7.1"]
                  [lein-pprint "1.1.1"]
                  [lein-swank "1.4.4"]
                  [lein-ring "0.7.5"]
                  [lein-cljsbuild "0.2.7"]
                  [lein-eclipse "1.0.0"]
                  [lein-git-deps "0.0.1-SNAPSHOT"]
                  [lein-outdated "0.1.0"]
                  [lein-noir "1.2.1"]
                  [lein-beanstalk "0.2.2"]
                  [lein-cloudbees "1.0.0"]
                  [lein-pedantic "0.0.3"]
                  [clj-ns-browser "1.3.0"]
                  [lein-ritz "0.4.2"]
                  [lein-midje "2.0.0-SNAPSHOT"]]}}

Below is the project.clj file -

(defproject hs-2 "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.4.0"]
                 [net.cgrand/moustache "1.1.0" :exclusions [org.clojure/clojure]]
                 [enlive "1.0.1" :exclusions [org.clojure/clojure]]
                 [ring "1.1.5"]
                 [clj-time "0.4.4"]
                 [clj-http "0.5.3"]
                 [org.thnetos/cd-client "0.3.4" :exclusions [[org.clojure/clojure] cheshire]]
                 [clojurewerkz/urly "1.0.0"]
                 [clj-airbrake "2.0.0"]]
  :profiles {:dev {:dependencies [[ring-serve "0.1.2"]
                                  [ring-mock "0.1.3"]
                                  [ritz/ritz-debugger "0.4.2"]
                                  [ritz/ritz-repl-utils "0.4.2"]
                                  [midje "1.4.0" :exclusions [org.clojure/clojure]]]}}
  :ring {:handler hs-2.routes/my-app}
  :repl-options {:init-ns hs-2.core
                 :init (do
                         (use 'hs-2.routes)
                         (use 'ring.util.serve)
                         (serve my-app)
                         (use 'ring.mock.request)
                         )}
  :resource-paths ["resources/public"]
  :pedantic :warn)

Upvotes: 2

Views: 879

Answers (1)

noahlz
noahlz

Reputation: 10311

It's because you are using SNAPSHOT dependencies. Set export LEIN_SNAPSHOTS_IN_RELEASE=1 in your shell or the lein script to override this.

Upvotes: 5

Related Questions