Permalink
Browse files

Search for pom.xml in jar's dirname, not only target. fix #8

Keeps us backwards compatible with Leiningen 1.7.0.
  • Loading branch information...
1 parent 695b6e9 commit ed51bae5ba661ab973707199738ed853bc32e021 @ato committed Mar 15, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/leiningen/push.clj
View
8 src/leiningen/push.clj
@@ -71,11 +71,13 @@
(JSch/setLogger (proxy [Logger] []
(isEnabled [level] true)
(log [level message] (println level message)))))
- (let [jarfile (get-jar-filename project)]
+ (let [jarfile (get-jar-filename project)
+ targetpath (.getParentFile (io/file jarfile))
+ pomfile (io/file targetpath "pom.xml")]
(pom project)
(jar project)
(try
- (scp-send repo "target/pom.xml" jarfile)
+ (scp-send repo pomfile jarfile)
(catch JSchException e
(.printStackTrace e)
(when (= (.getMessage e) "Auth fail")
@@ -86,4 +88,4 @@
"work yet with DSA or passphrased keys. I'm working\n"
"on fixing this. You can also push directly with scp:\n\n"
"lein pom\n"
- "scp pom.xml " jarfile " clojars@clojars.org:" )))))))
+ "scp " pomfile " " jarfile " clojars@clojars.org:" )))))))

0 comments on commit ed51bae

Please sign in to comment.