You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by vb...@apache.org on 2008/09/01 08:13:59 UTC
svn commit: r690855 - in /incubator/buildr/trunk/doc/pages:
getting_started.textile projects.textile
Author: vborja
Date: Sun Aug 31 23:13:59 2008
New Revision: 690855
URL: http://svn.apache.org/viewvc?rev=690855&view=rev
Log:
Documentation for --project option and path-like tasks from command line
Modified:
incubator/buildr/trunk/doc/pages/getting_started.textile
incubator/buildr/trunk/doc/pages/projects.textile
Modified: incubator/buildr/trunk/doc/pages/getting_started.textile
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/doc/pages/getting_started.textile?rev=690855&r1=690854&r2=690855&view=diff
==============================================================================
--- incubator/buildr/trunk/doc/pages/getting_started.textile (original)
+++ incubator/buildr/trunk/doc/pages/getting_started.textile Sun Aug 31 23:13:59 2008
@@ -213,6 +213,7 @@
| @-t/--trace@ | Turn on invoke/execute tracing, enable full backtrace. |
| @-v/--version@ | Display the program version. |
| @-P/--prereqs@ | Display tasks and dependencies, then exit. |
+| @-p/--project [dir]@ | Chage to project directory before executing tasks. |
You can tell Buildr to run specific tasks and the order to run them. For example:
Modified: incubator/buildr/trunk/doc/pages/projects.textile
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/doc/pages/projects.textile?rev=690855&r1=690854&r2=690855&view=diff
==============================================================================
--- incubator/buildr/trunk/doc/pages/projects.textile (original)
+++ incubator/buildr/trunk/doc/pages/projects.textile Sun Aug 31 23:13:59 2008
@@ -170,6 +170,51 @@
$ buildr help:tasks
}}}
+h3. Running in other project directory
+
+The @--project@ (@-p@) option is like @make@'s @-C@, using it you can instruct @Buildr@ to run in other directory.
+The following example runs the @clean@ and @compile@ tasks on project defined in @my_project@ directory:
+
+{{{!sh
+cd /tmp/republic/of/nowhere
+buidlr -p /projects/my_project clean compile
+}}}
+
+The argument to @--project@ can also be a project name, in that case, execution is performed having the
+project's basedir as working directory.
+
+{{{!sh
+# instead of
+buildr foo:bar:clean foo:bar:compile
+# you can do a more scriptable and easy to the eyes
+buildr -p foo:bar clean compile
+}}}
+
+h3. Path-like command line arguments
+
+Buildr allows you to specify a task in path-like form. This can be really useful when working with shell file
+completion.
+Some examples:
+
+{{{!sh
+# run the 'build' task on foo:bar project
+buildr foo:bar
+# same as above but using shell completion.
+buildr foo/bar
+
+# you can also append the task name to execute
+buildr foo/bar/compile
+
+# or specify a file-task to be executed.
+# this example will trigger execution of 'compile' task.
+buildr foo/bar/target/classes
+
+# while you are working on a subproject (foo:bar)
+cd foo/bar
+# you may want to execute a task on another one
+# (generated_file at foo:baz:bat)
+buildr ../baz/bat/generated_file
+}}}
h2. Setting Project Properties