Fix jar task for :classifiers
The classified jar files were not being generated due to incorrect arguments in code.
This commit is contained in:
parent
e6d5b2a80c
commit
942cbee34a
4 changed files with 17 additions and 1 deletions
|
@ -320,7 +320,7 @@ Create a $PROJECT-$VERSION-$CLASSIFIER.jar file for each entry in the project's
|
|||
:classifiers. Returns a map of :classifier/:extension coordinates to files."
|
||||
[{:keys [classifiers] :as project} provided-profiles]
|
||||
(into {}
|
||||
(map #(apply classifier-jar project %) provided-profiles classifiers)))
|
||||
(map #(apply classifier-jar project provided-profiles %) classifiers)))
|
||||
|
||||
(defn jar
|
||||
"Package up all the project's files into a jar file.
|
||||
|
|
|
@ -54,6 +54,8 @@
|
|||
|
||||
(def jvm-opts-project (read-test-project "jvm-opts"))
|
||||
|
||||
(def with-classifiers-project (read-test-project "with-classifiers"))
|
||||
|
||||
(defn abort-msg
|
||||
"Catches main/abort thrown by calling f on its args and returns its error
|
||||
message."
|
||||
|
|
|
@ -76,6 +76,17 @@
|
|||
(with-out-str
|
||||
(is (jar helper/sample-no-aot-project))))
|
||||
|
||||
(deftest test-classifier-jar-succeeds
|
||||
(is (= 1 (count (:classifiers helper/with-classifiers-project)))
|
||||
"test project has a classifier")
|
||||
(is (= 1 (count (classifier-jars helper/with-classifiers-project nil)))
|
||||
"test project produces a classifier jar")
|
||||
(with-out-str
|
||||
(is (jar helper/with-classifiers-project)
|
||||
"jar runs correctly")
|
||||
(is (= 2 (count (jar helper/with-classifiers-project)))
|
||||
"jar produces two jar files")))
|
||||
|
||||
(deftest ^:online test-no-deps-jar
|
||||
(let [[coord jar-file] (first
|
||||
(jar (dissoc helper/sample-project
|
||||
|
|
3
test_projects/with-classifiers/project.clj
Normal file
3
test_projects/with-classifiers/project.clj
Normal file
|
@ -0,0 +1,3 @@
|
|||
(defproject with-classifiers "0.1.0-SNAPSHOT"
|
||||
:classifiers {:tests {:source-paths ^:replace ["test"]
|
||||
:resource-paths ^:replace []}})
|
Loading…
Reference in a new issue