From 6687fcd6270213e3b36c1b6e59a9ac9c10c59bf2 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 14 Apr 2018 02:02:45 -0400 Subject: - Fixed a bug when packaging uber-JARs in lux-lein. --- lux-lein/src/leiningen/lux/packager.clj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lux-lein/src/leiningen/lux/packager.clj b/lux-lein/src/leiningen/lux/packager.clj index 6fbc45d14..9bea3ef5c 100644 --- a/lux-lein/src/leiningen/lux/packager.clj +++ b/lux-lein/src/leiningen/lux/packager.clj @@ -109,9 +109,12 @@ (re-find pattern entry-name))] (when matches? (let [os (new ByteArrayOutputStream 1024) - [_data _entry] (get @!all-jar-files entry-name [(byte-array 0) nil]) - _ (write os (fuse (read (new ByteArrayInputStream _data)) - (read (new ByteArrayInputStream entry-data))))] + no-data (byte-array 0) + [_data _entry] (get @!all-jar-files entry-name [no-data nil]) + _ (if (= no-data _data) + (write os (read (new ByteArrayInputStream entry-data))) + (write os (fuse (read (new ByteArrayInputStream _data)) + (read (new ByteArrayInputStream entry-data)))))] (.toByteArray os))))) (eval (get project :uberjar-merge-with))) entry-data)] -- cgit v1.2.3