Permalink
Browse files

Fix jar task with jar-inclusions

  • Loading branch information...
xeqi committed Feb 1, 2012
1 parent 2f73e7d commit 1c5babe984344195409632a35820ced6cc9289b5
Showing with 5 additions and 4 deletions.
  1. +1 −1 src/leiningen/jar.clj
  2. +3 −2 src/leiningen/uberjar.clj
  3. +1 −1 test/leiningen/test/uberjar.clj
View
@@ -158,7 +158,7 @@
[{:type :paths :paths (:source-path project)}
{:type :paths :paths (:java-source-path project)}])
(if-let [jar-inclusions (:jar-inclusions project)]
- {:type :paths :paths jar-inclusions})
+ [{:type :paths :paths jar-inclusions}])
;; (shell-wrapper-filespecs project deps-fileset)
))
@@ -81,8 +81,9 @@ as well as defining a -main function."
project)
project (update-in project [:jar-inclusions]
concat (:uberjar-inclusions project))]
- (when (pos? (jar project))
- (abort "Uberjar aborting because jar/compilation failed.")))
+ (let [res (jar project)]
+ (when (and (number? res) (pos? res))
+ (abort "Uberjar aborting because jar/compilation failed."))))
(let [standalone-filename (get-jar-filename project :uberjar)]
(with-open [out (-> standalone-filename
(FileOutputStream.)
@@ -6,7 +6,7 @@
(deftest test-uberjar
(let [filename "test_projects/sample_no_aot/target/nomnomnom-0.5.0-SNAPSHOT-standalone.jar"
- _ (with-out-str (uberjar sample-no-aot-project))
+ _ (uberjar sample-no-aot-project)
entries (->> (ZipFile. filename)
.entries
enumeration-seq

0 comments on commit 1c5babe

Please sign in to comment.