Skip to content

Commit

Permalink
add project files to the uberjar first, then dependencies
Browse files Browse the repository at this point in the history
since duplicates are skipped, add the project files to the uberjar
first, so that they always win the war of the duplicates.  for
instance, MANIFEST.MF from clojure would previously have been added
before MANIFEST.MF from the project's jar, making :main not work.
  • Loading branch information
joegallo committed Mar 10, 2011
1 parent 96ff4ee commit 90aad00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/leiningen/uberjar.clj
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ the dependency jars. Suitable for standalone distribution."
(ZipOutputStream.))]
(let [deps (->> (.listFiles (file (:library-path project)))
(filter #(.endsWith (.getName %) ".jar")))
jars (conj (vec deps) (file (get-jar-filename project)))]
jars (cons (file (get-jar-filename project)) deps)]
(write-components project jars out)))
(println "Created" standalone-filename))
(abort "Uberjar aborting because jar/compilation failed.")))
Expand Down

0 comments on commit 90aad00

Please sign in to comment.