A simple copy
task that allows boot builds to copy files from previous tasks into a specified directory.
[cpmcdaniel/boot-copy "1.0"] ;; latest release
The following examples assume you have boot installed and up to date.
If you already have a build.boot
, add the dependency above to :dependencies
and (require '[cpmcdaniel/boot-copy :refer :all])
. The build.boot file
may look like the following:
(set-env!
:source-paths #{"src/main/java" "src/main/clojure"}
:resource-paths #{"src/main/resources"}
:dependencies '[[cpmcdaniel/boot-copy "<version>" :scope "provided"]]) ;; latest version
(require '[cpmcdaniel.boot-copy :refer :all])
(task-options!
copy {:output-dir "/home/foo/backups"
:matching #{#"\.jar$"}})
(deftask build
"Build my project"
[]
(comp (jar) (copy)))
The build can then be executed with boot build
or:
boot jar copy -m '\.jar$' -o /home/foo/backups
Thanks to the boot developers and the folks in #hoplon on FreeNode IRC for answering all my annoying questions.
Copyright © 2015 Craig McDaniel
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.