 (ns leiningen.core
-  (:use [clojure.contrib.with-ns])
+  (:use [clojure.contrib.with-ns]
+        [clojure.contrib.find-namespaces :only [find-namespaces-on-classpath]])
   (:import [java.io File])
   (:gen-class))
 

     (catch java.io.FileNotFoundException e
       error-fn))))

(defn ns->path [n]
  (str (.. (str n)
           (replace \- \_)

       (binding [*compile-path* compile-path]
         ;; TODO: can we catch only task-level arity problems here?
         ;; compare args and (:arglists (meta (resolve-task task)))?
         (run-task task args))
       ;; In case tests or some other task started any:
       (shutdown-agents)))
  ([] (apply -main (or *command-line-args* ["help"]))))
