Fix #54; make sure all tasks have fn-level docstrings.
This is a workaround for Clojure issue #130.
This commit is contained in:
parent
c851b81659
commit
f6333042c2
7 changed files with 17 additions and 21 deletions
|
@ -42,21 +42,8 @@
|
|||
(:repositories project)))
|
||||
|
||||
(defn deps
|
||||
"Download and install all :dependencies listed in project.clj into the lib/
|
||||
directory. With an argument it will skip development dependencies. Dependencies
|
||||
should be a vector of entries specifying group, name, and version like the
|
||||
following:
|
||||
[org.clojure/clojure-contrib \"1.0-SNAPSHOT\"]
|
||||
|
||||
It is also possible to exclude specific indirect dependencies of a direct
|
||||
dependency using the optional :exclusions keyword and vector of entries.
|
||||
A project that depends on log4j could exclude unnecessary indirect
|
||||
dependencies with the following:
|
||||
[log4j \"1.2.15\" :exclusions [javax.mail/mail
|
||||
javax.jms/jms
|
||||
com.sun.jdmk/jmxtools
|
||||
com.sun.jmx/jmxri]]"
|
||||
;; TODO: get deps from ~/.m2 while offline
|
||||
"Download and install all :dependencies listed in project.clj.
|
||||
With an argument it will skip development dependencies."
|
||||
([project skip-dev set]
|
||||
(let [deps-task (DependenciesTask.)]
|
||||
(.setBasedir lancet/ant-project (:root project))
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
"Display a list of tasks or help for a given task."
|
||||
(:use [clojure.contrib.find-namespaces :only [find-namespaces-on-classpath]]))
|
||||
|
||||
(def tasks (set (filter #(re-find #"^leiningen\.(?!core)" (name %))
|
||||
(def tasks (set (filter #(re-find #"^leiningen\.(?!core|checkout-deps)"
|
||||
(name %))
|
||||
(find-namespaces-on-classpath))))
|
||||
|
||||
(defn get-arglists [task]
|
||||
|
@ -27,6 +28,7 @@
|
|||
" - " (:doc (meta (find-ns task-ns))))))
|
||||
|
||||
(defn help
|
||||
"Display a list of tasks or help for a given task."
|
||||
([task] (println (help-for task)))
|
||||
([]
|
||||
(println "Leiningen is a build tool for Clojure.\n")
|
||||
|
|
|
@ -38,7 +38,9 @@
|
|||
(.getPackaging model)
|
||||
nil))
|
||||
|
||||
(defn install [project]
|
||||
(defn install
|
||||
"Install the project and its dependencies in your local repository."
|
||||
[project]
|
||||
(let [jarfile (file (jar project))
|
||||
model (make-model project)
|
||||
artifact (make-artifact model)
|
||||
|
|
|
@ -8,6 +8,10 @@ Neither group-id nor artifact-id may contain slashes."
|
|||
[clojure.contrib.string :only [join]]))
|
||||
|
||||
(defn new
|
||||
"Create a new project skeleton.
|
||||
lein new [group-id/]artifact-id [project-dir]
|
||||
Group-id is optional. Project-dir defaults to artifact-id if not given.
|
||||
Neither group-id nor artifact-id may contain slashes."
|
||||
([project-name project-dir]
|
||||
(when (re-find #"(?<!clo)jure" project-name)
|
||||
(throw (IllegalArgumentException. "*jure names are no longer allowed.")))
|
||||
|
|
|
@ -169,6 +169,7 @@
|
|||
(.getBytes (str baos))))
|
||||
|
||||
(defn pom
|
||||
"Write a pom.xml file to disk for Maven interop."
|
||||
([project pom-location silently?]
|
||||
(let [pom-file (file (:root project) pom-location)]
|
||||
(copy (make-pom project true) pom-file)
|
||||
|
|
|
@ -52,7 +52,9 @@
|
|||
(catch java.net.ConnectException _ :retry))
|
||||
(recur port)))
|
||||
|
||||
(defn repl [project]
|
||||
(defn repl
|
||||
"Start a repl session for the current project."
|
||||
[project]
|
||||
(let [port (dec (+ 1024 (rand-int 64512)))
|
||||
server-form (repl-server project port)
|
||||
server-thread (Thread. #(try (eval-in-project project server-form)
|
||||
|
|
|
@ -39,9 +39,7 @@
|
|||
|
||||
(defn uberjar
|
||||
"Create a jar like the jar task, but including the contents of each of
|
||||
the dependency jars. Suitable for standalone distribution. Note that this
|
||||
will include all jars in lib, so if you have dev dependencies in there, you
|
||||
may wish to clean first."
|
||||
the dependency jars. Suitable for standalone distribution."
|
||||
[project]
|
||||
(jar project)
|
||||
(let [jarname-root (str (:name project) \- (:version project))]
|
||||
|
|
Loading…
Reference in a new issue