       (throw (ex-info "TODO" {:ctime ctime :sha sha} old-exception)))
     (throw (ex-info (str "Not parseable as git-version: " version) {:artifact art} old-exception))))
 
+(defn with-log-level [level f]
+  (let [handlers (doall (.getHandlers (Logger/getLogger "")))
+        old-levels (doall (map #(.getLevel ^Handler %) handlers))
+        _ (doseq [h handlers] (.setLevel ^Handler h level))
+        result (f)]
+    (dorun (map #(.setLevel ^Handler %1 %2) handlers old-levels))
+    result))
+
+(def null-writer
+  (proxy [java.io.Writer] []
+    (write ([_]) ([_ _ _]))
+    (flush [])
+    (close [])))
+
 (defn try-once-resolve-git-version [project]
   (try
-    (leiningen.core.classpath/resolve-dependencies :dependencies project)
+    (with-log-level Level/OFF
+      #(binding [*err* null-writer]
+         (leiningen.core.classpath/resolve-dependencies :dependencies project)))
     :ok
     (catch Exception e
       ;; lein resolve-dependencies wraps a

  (:require [cemerick.pomegranate.aether :as aether]
            [clojure.pprint :refer [pprint]]
            [leiningen.git-version :as gv])
  (:import (org.sonatype.aether.transfer ArtifactNotFoundException)))

(set! *warn-on-reflection* true)


  "Resolves project dependencies like 'lein deps', but also uses TOOL_REPOS_DIR"
  [project & args]

  (try
    (loop []
      (when-not (= :ok (try-once-resolve-git-version project))
        (recur)))
    (catch clojure.lang.ExceptionInfo e
      (println "Failed to resolve dependency:" (.getMessage e))
      (pprint {:exception-data (ex-data e)}))))
