Skip to content

Commit

Permalink
Reorder jar/pom generation for deploy, fixes technomancy#1821
Browse files Browse the repository at this point in the history
If pom is put in target/, :auto-clean true will remove it if the jar is
created afterwards.
  • Loading branch information
hypirion committed Mar 24, 2015
1 parent ff84da6 commit 34d62f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/leiningen/deploy.clj
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@

(defn files-for [project repo]
(let [signed? (sign-for-repo? repo)
artifacts (merge {[:extension "pom"] (pom/pom project)}
(jar/jar project))
;; If pom is put in "target/", :auto-clean true will remove it if the
;; jar is created afterwards. So make jar first, then pom.
artifacts (merge (jar/jar project)
{[:extension "pom"] (pom/pom project)})
sig-opts (signing-opts project repo)]
(if (and signed? (not (.endsWith (:version project) "-SNAPSHOT")))
(reduce merge artifacts (map #(signature-for-artifact % sig-opts)
Expand Down

0 comments on commit 34d62f8

Please sign in to comment.