Skip to content

Loading…

Source path included twice when building a war or uberwar #56

Merged
merged 1 commit into from

2 participants

@mstump

My source path was being included twice when building a war or uberwar, resulting in the error:

duplicate entry: WEB-INF/classes/courier/config.clj

Lein, when building jars makes sure the paths included are distinct, so I did the same for wars.

I also bumped the version to 0.7.6 (please publish, pretty please). Thanks!

@weavejester
Owner

Could you ensure that the patch only contains changes related to the pull request? i.e. no version number bumps or spacing changes.

@mstump

Version bump is reverted. The spacing change was the removal of tailing white space, do you still want me to re-add them?

@weavejester
Owner

Yes, or put them in a separate commit so that it's clear why those lines have changed. Also can you squash your two commits, 1662799 and 7c77e03, into one?

@mstump

I've done as you requested.

@weavejester weavejester merged commit 5be1f7b into weavejester:master
@weavejester
Owner

Thanks for the patch. Sorry it took a while to merge it.

@mstump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 19, 2012
  1. @mstump
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/leiningen/ring/uberwar.clj
  2. +2 −2 src/leiningen/ring/war.clj
View
4 src/leiningen/ring/uberwar.clj
@@ -33,8 +33,8 @@
(doto war-stream
(war/str-entry "WEB-INF/web.xml" (war/make-web-xml project))
(war/dir-entry project "WEB-INF/classes/" (:compile-path project)))
- (doseq [path (concat [(:source-path project)] (:source-paths project)
- [(:resources-path project)] (:resource-paths project))
+ (doseq [path (distinct (concat [(:source-path project)] (:source-paths project)
+ [(:resources-path project)] (:resource-paths project)))
:when path]
(war/dir-entry war-stream project "WEB-INF/classes/" path))
(war/dir-entry war-stream project "" (war/war-resources-path project))
View
4 src/leiningen/ring/war.clj
@@ -188,8 +188,8 @@
(doto war-stream
(str-entry "WEB-INF/web.xml" (make-web-xml project))
(dir-entry project "WEB-INF/classes/" (:compile-path project)))
- (doseq [path (concat [(:source-path project)] (:source-paths project)
- [(:resources-path project)] (:resource-paths project))
+ (doseq [path (distinct (concat [(:source-path project)] (:source-paths project)
+ [(:resources-path project)] (:resource-paths project)))
:when path]
(dir-entry war-stream project "WEB-INF/classes/" path))
(dir-entry war-stream project "" (war-resources-path project))
Something went wrong with that request. Please try again.