Permalink
Browse files

Catch old org.clojure special cased group-ids.

  • Loading branch information...
1 parent e3fdea2 commit 0dc19241eef46a822a8148a6820d1b6cbc8f319b @technomancy committed Feb 23, 2012
Showing with 10 additions and 3 deletions.
  1. +9 −2 src/leiningen/precate.clj
  2. +1 −1 test/p1.clj
View
@@ -49,7 +49,6 @@
project (dissoc project :multi-deps)]
(reduce multi-deps-profile project deps)))
-;; TODO: catch org.clojure special-cases
(def dev-deps-special-cases {'swank-clojure ['lein-swank "1.4.1"]
'lein-multi nil})
@@ -62,8 +61,16 @@
(update-in project [:plugins] (fnil conj {}) replacement)
project)))
+(defn add-org-clojure [dependencies]
+ (for [[artifact version] dependencies]
+ (if (#{'clojure 'clojure-contrib} artifact)
+ [(symbol "org.clojure" (name artifact)) version]
+ [artifact version])))
+
(defn special-case-dev-deps [project]
- (reduce special-case-dep project dev-deps-special-cases))
+ (reduce special-case-dep
+ (update-in project [:dependencies] add-org-clojure)
+ dev-deps-special-cases))
(defn min-lein-version [project]
(assoc project :min-lein-version "2.0.0"))
View
@@ -1,6 +1,6 @@
(defproject hi "1.0.0"
:dependencies [[ordered "1.1.0"]
- [org.clojure/clojure "1.3.0"]]
+ [clojure "1.3.0"]]
:dev-dependencies [[swank-clojure "1.4.0"]
[lein-tar "1.0.6"]
[robert/hooke "1.1.3"]

0 comments on commit 0dc1924

Please sign in to comment.