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,28 +157,32 @@
|
||||||
(str (:name project) \- (:version project) "-standalone.jar")))
|
(str (:name project) \- (:version project) "-standalone.jar")))
|
||||||
|
|
||||||
(defn- filespecs [project deps-fileset]
|
(defn- filespecs [project deps-fileset]
|
||||||
(concat
|
(let [javasrc (:java-source-path project)
|
||||||
[{:type :bytes
|
cljsrc (:source-path project)]
|
||||||
:path (format "META-INF/maven/%s/%s/pom.xml"
|
(concat
|
||||||
(:group project)
|
[{:type :bytes
|
||||||
(:name project))
|
:path (format "META-INF/maven/%s/%s/pom.xml"
|
||||||
:bytes (make-pom project)}
|
(:group project)
|
||||||
{:type :bytes
|
(:name project))
|
||||||
:path (format "META-INF/maven/%s/%s/pom.properties"
|
:bytes (make-pom project)}
|
||||||
(:group project)
|
{:type :bytes
|
||||||
(:name project))
|
:path (format "META-INF/maven/%s/%s/pom.properties"
|
||||||
:bytes (make-pom-properties project)}
|
(:group project)
|
||||||
{:type :path :path (:compile-path project)}
|
(:name project))
|
||||||
{:type :path :path (str (:root project) "/project.clj")}]
|
:bytes (make-pom-properties project)}
|
||||||
(when (and (:resources-path project)
|
{:type :path :path (:compile-path project)}
|
||||||
(.exists (file (:resources-path project))))
|
{:type :path :path (str (:root project) "/project.clj")}]
|
||||||
[{:type :path :path (:resources-path project)}])
|
(when (and (:resources-path project)
|
||||||
(when (and (:java-source-path project)
|
(.exists (file (:resources-path project))))
|
||||||
(not (:omit-source project)))
|
[{:type :path :path (:resources-path project)}])
|
||||||
[{:type :path :path (:java-source-path project)}])
|
(when (and javasrc
|
||||||
(when-not (:omit-source project)
|
(not (:omit-source project))
|
||||||
[{:type :path :path (:source-path project)}])
|
(not (.startsWith javasrc cljsrc))
|
||||||
(shell-wrapper-filespecs project deps-fileset)))
|
(not (.startsWith cljsrc javasrc)))
|
||||||
|
[{:type :path :path javasrc}])
|
||||||
|
(when-not (:omit-source project)
|
||||||
|
[{:type :path :path cljsrc}])
|
||||||
|
(shell-wrapper-filespecs project deps-fileset))))
|
||||||
|
|
||||||
(defn extract-jar
|
(defn extract-jar
|
||||||
"Unpacks jar-file into target-dir. jar-file can be a JarFile
|
"Unpacks jar-file into target-dir. jar-file can be a JarFile
|
||||||
|
|
Loading…
Reference in a new issue