Skip to content
Gregg Reynolds edited this page Feb 15, 2016 · 5 revisions

Boot comes with a small set of predefined tasks. At the command line, boot help will list the tasks. Usage notes for each task are available: boot <task> -h. For example,

$ boot aot -h
Perform AOT compilation of Clojure namespaces.

Options:
  -h, --help          Print this help info.
  -a, --all           Compile all namespaces.
  -n, --namespace NS  Conj NS onto the set of namespaces to compile.

The same information is available online at boot.task.builtin.

Examples

To see what's happening you can insert show -f anywhere in the pipeline any number of times.

aot compiling

  • Compile one namespace, and move the results to some dir under the build root:
$ boot aot -n foo.bar sift -i "class$" -m "(.*\.class):WEB-INF/classes/\$1" target

sifting

  • Move *.clj files to a build sub-dir
$ boot sift -m "(.*)clj$:WEB-INF/classes/\$1clj" target

The syntax for --move is MATCH:REPLACE; at the command line just quote the whole thing and escape the '$' of positional match vars - here, $1.

uber

  • Copy all dependency jars, as jars, to some build dir
$ boot uber -j sift -i "jar$" -m "(.*\.jar$):WEB-INF/lib/\$1" target
Clone this wiki locally