Fixed a bug where if the java-source-path was the same as source-path, lein jar
would try to include things twice resulting in duplicate zip entry errors.
This commit is contained in:
parent
192daf2111
commit
76e708861f
1 changed files with 26 additions and 22 deletions
|
@ -157,6 +157,8 @@
|
|||
(str (:name project) \- (:version project) "-standalone.jar")))
|
||||
|
||||
(defn- filespecs [project deps-fileset]
|
||||
(let [javasrc (:java-source-path project)
|
||||
cljsrc (:source-path project)]
|
||||
(concat
|
||||
[{:type :bytes
|
||||
:path (format "META-INF/maven/%s/%s/pom.xml"
|
||||
|
@ -173,12 +175,14 @@
|
|||
(when (and (:resources-path project)
|
||||
(.exists (file (:resources-path project))))
|
||||
[{:type :path :path (:resources-path project)}])
|
||||
(when (and (:java-source-path project)
|
||||
(not (:omit-source project)))
|
||||
[{:type :path :path (:java-source-path project)}])
|
||||
(when (and javasrc
|
||||
(not (:omit-source project))
|
||||
(not (.startsWith javasrc cljsrc))
|
||||
(not (.startsWith cljsrc javasrc)))
|
||||
[{:type :path :path javasrc}])
|
||||
(when-not (:omit-source project)
|
||||
[{:type :path :path (:source-path project)}])
|
||||
(shell-wrapper-filespecs project deps-fileset)))
|
||||
[{:type :path :path cljsrc}])
|
||||
(shell-wrapper-filespecs project deps-fileset))))
|
||||
|
||||
(defn extract-jar
|
||||
"Unpacks jar-file into target-dir. jar-file can be a JarFile
|
||||
|
|
Loading…
Reference in a new issue