Recognize a :classifier keyword for dependencies as the Maven classifier
Fixes #58
This commit is contained in:
parent
99de1160f2
commit
32ceeba111
1 changed files with 12 additions and 3 deletions
|
@ -75,9 +75,17 @@
|
|||
(.setGroupId (or (namespace excl) (name excl)))
|
||||
(.setArtifactId (name excl))))
|
||||
|
||||
(defn make-dependency [[dep version & exclusions]]
|
||||
(let [es (map make-exclusion (when (= (first exclusions) :exclusions)
|
||||
(second exclusions)))]
|
||||
(defn make-dependency
|
||||
"Makes a dependency from a seq. The seq (usually a vector) should contain a symbol to define the
|
||||
group and artifact id, then a version string. The remaining arguments are combined into a map. The value
|
||||
for the :classifier key (if present) is the classifier on the dependency (as a string). The value for
|
||||
the :exclusions key, if present, is a seq of symbols, identifying group ids and artifact ids to exclude
|
||||
from transitive dependencies."
|
||||
[[dep version & extras]]
|
||||
(let [extras-map (apply hash-map extras)
|
||||
exclusions (:exclusions extras-map)
|
||||
classifier (:classifier extras-map)
|
||||
es (map make-exclusion exclusions)]
|
||||
(doto (Dependency.)
|
||||
;; Allow org.clojure group to be omitted from clojure/contrib deps.
|
||||
(.setGroupId (if (and (nil? (namespace dep))
|
||||
|
@ -86,6 +94,7 @@
|
|||
(or (namespace dep) (name dep))))
|
||||
(.setArtifactId (name dep))
|
||||
(.setVersion version)
|
||||
(.setClassifier classifier)
|
||||
(.setExclusions es))))
|
||||
|
||||
(defn make-repository [[id url]]
|
||||
|
|
Loading…
Reference in a new issue