        (binding [*compile-path* compile-path]
          ;; TODO: can we catch only task-level arity problems here?
          ;; compare args and (:arglists (meta (resolve-task task)))?
-         ;; TODO: wrap tasks in run-task using alter-var-root
          (let [value (run-task task args)]
            (when (integer? value)
              (System/exit value))))))

        (abort "No project.clj found in this directory."))))
  ([] (read-project "project.clj")))

(def aliases {"--help" "help" "-h" "help" "-?" "help" "-v" "version"
              "--version" "version" "überjar" "uberjar"})

(def no-project-needed (atom #{"new" "help" "version"}))



(defn -main
  ([& [task & args]]
     (let [task (or (@aliases task) task "help")
           args (if (@no-project-needed task)
                  args
                  (conj args (read-project)))
