From dfb4b759b0f4da49d023b0b84845cb5eaa79ccbd Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Thu, 23 Jun 2011 20:19:39 -0700 Subject: [PATCH] Doco updates. --- NEWS | 10 ++++++++++ README.md | 6 +++--- src/leiningen/deploy.clj | 2 +- src/leiningen/help.clj | 2 +- src/leiningen/run.clj | 2 +- src/leiningen/search.clj | 2 +- src/leiningen/test!.clj | 2 +- src/leiningen/trampoline.clj | 12 +++++++----- src/leiningen/uberjar.clj | 2 +- 9 files changed, 26 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index 1f0afaa6..51a57398 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,16 @@ Leiningen NEWS -- history of user-visible changes = 1.6.0 / ??? +* Enforce project names as readable symbols. + +* Add trampoline task. + +* Fix a bug where plugins would be unavailable in MinGW. + +* Allow functions other than -main to be called using run task. + +* Support constructing classpath out of ~/.m2 instead of copying to lib/. + * Fix a bug where help output could be truncated by plugin issues. * Support native dependencies. diff --git a/README.md b/README.md index 89793e84..15ea8d3e 100644 --- a/README.md +++ b/README.md @@ -209,9 +209,9 @@ See the plugin task's help for more information. new processes that blocks access to console input. This means that functions like read-line will not work as expected in most contexts, though the repl task necessarily includes a - workaround. You can also use java -cp \`lein classpath\` - my.main.namespace to launch a process with the correct - classpath that still has access to stdin. + workaround. You can also use the trampoline task to + launch your project's JVM after Leiningen's has exited rather than + launching it as a subprocess ## Contributing diff --git a/src/leiningen/deploy.clj b/src/leiningen/deploy.clj index b44de3be..0cf3888d 100644 --- a/src/leiningen/deploy.clj +++ b/src/leiningen/deploy.clj @@ -22,7 +22,7 @@ (make-repository [repository-name repository]))) (defn deploy - "Build and deploy jar to remote repository. + "Build jar and deploy to remote repository. The target repository will be looked up in :repositories: snapshot versions will go to the repo named \"snapshots\" while stable versions diff --git a/src/leiningen/help.clj b/src/leiningen/help.clj index 1d5b66ed..f6f15e57 100644 --- a/src/leiningen/help.clj +++ b/src/leiningen/help.clj @@ -88,7 +88,7 @@ Also provides readme, tutorial, news, sample, and copying documentation." ([task] (println (or (static-help task) (help-for task)))) ([] - (println "Leiningen is a build tool for Clojure.\n") + (println "Leiningen is a tool for working with Clojure projects.\n") (println "Several tasks are available:") (doseq [task-ns tasks] (println (help-summary-for task-ns))) diff --git a/src/leiningen/run.clj b/src/leiningen/run.clj index e6a879b5..7a1654ba 100644 --- a/src/leiningen/run.clj +++ b/src/leiningen/run.clj @@ -20,7 +20,7 @@ nil nil `(require '~main-ns))))) (defn ^{:help-arglists '([])} run - "Run a -main function with optional command-line arguments. + "Run the project's -main function. USAGE: lein run [--] [ARGS...] Calls the -main function in the namespace specified as :main in project.clj. diff --git a/src/leiningen/search.clj b/src/leiningen/search.clj index b209d484..2a8b76a0 100644 --- a/src/leiningen/search.clj +++ b/src/leiningen/search.clj @@ -76,7 +76,7 @@ (prn))) (defn ^{:help-arglists '([query] [query page])} search - "Search remote repository contents. + "Search remote repositories. The first run will download a set of indices, which will take a while. Pass in --update as the query to force a fresh download of all diff --git a/src/leiningen/test!.clj b/src/leiningen/test!.clj index 92f22571..6947d278 100644 --- a/src/leiningen/test!.clj +++ b/src/leiningen/test!.clj @@ -1,5 +1,5 @@ (ns leiningen.test! - "Run a project's tests after cleaning and fetching dependencies." + "Run the project's tests after cleaning and fetching dependencies." (:refer-clojure :exclude [test]) (:use [leiningen.clean :only [clean]] [leiningen.deps :only [deps]] diff --git a/src/leiningen/trampoline.clj b/src/leiningen/trampoline.clj index 296b6d8b..934b3f79 100644 --- a/src/leiningen/trampoline.clj +++ b/src/leiningen/trampoline.clj @@ -18,14 +18,16 @@ (spit (System/getProperty "leiningen.trampoline-file") command)) (defn trampoline - "Calculate what needs to run in the project's process for the -provided task and run it after Leiningen's own process has exited -rather than as a subprocess of Leiningen's project. + "Run a task without nesting the project's JVM inside Leiningen's. -ALPHA: subject to change without warning. +Calculates what needs to run in the project's process for the provided +task and runs it after Leiningen's own JVM process has exited rather +than as a subprocess of Leiningen's project. Use this to save memory or to work around things like Ant's stdin -issues. Not compatible with chaining." +issues. Not compatible with chaining. + +ALPHA: subject to change without warning." [project task-name & args] (let [java-cmd (format "%s/bin/java" (System/getProperty "java.home")) jvm-opts (get-input-args) diff --git a/src/leiningen/uberjar.clj b/src/leiningen/uberjar.clj index ccdd1915..3e74c76b 100644 --- a/src/leiningen/uberjar.clj +++ b/src/leiningen/uberjar.clj @@ -66,7 +66,7 @@ (.closeEntry out)))) (defn uberjar - "Package up the project files and deps into a jar file. + "Package up the project files and all dependencies into a jar file. Includes the contents of each of the dependency jars. Suitable for standalone distribution."