Skip to content

Commit

Permalink
Fix jar task with jar-inclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
xeqi committed Feb 1, 2012
1 parent 2f73e7d commit 1c5babe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/leiningen/jar.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
))

Expand Down
5 changes: 3 additions & 2 deletions src/leiningen/uberjar.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down
2 changes: 1 addition & 1 deletion test/leiningen/test/uberjar.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c5babe

Please sign in to comment.