Warning on install if mvn is missing.

This commit is contained in:
Phil Hagelberg 2009-11-17 20:16:41 -08:00
parent 87afe4394a
commit 879b96b70f
2 changed files with 7 additions and 5 deletions

View file

@ -9,7 +9,9 @@
(pom project)
;; TODO: use maven-ant-tasks InstallTask with in-memory Pom object
(with-sh-dir (:root project)
;; TODO: better error if mvn isn't installed
(sh "mvn" "install:install-file" "-DpomFile=pom.xml"
(str "-Dfile=" jarfile)))
(println "Installed" (:group project) "/" (:name project))))
(try (sh "mvn" "install:install-file" "-DpomFile=pom.xml"
(str "-Dfile=" jarfile))
(println "Installed" (:group project) "/" (:name project))
(catch java.io.IOException _
(.write *err* "Currently maven must be present to install.\n")
(System/exit 1))))))

View file

@ -31,5 +31,5 @@
(let [preds (if (empty? args)
[identity]
(map (comp eval read-string) args))]
;; TODO: System/exit appropriately
;; TODO: System/exit appropriately (depends on Clojure ticket #193)
(run-matching project preds)))