See https://github.com/clojure/tools.deps.alpha/wiki/Tools for better tooling based on
boot-tools-deps was designed to allow you to use Boot to perform certain simple Boot tasks on top of an existing, working
deps.edn project -- prior to the arrival of all that tooling -- such as building an uberjar. It was never intended to allow the full spectrum of Boot tooling to be used (but I think I mistakenly gave that impression in the original README).
A Boot task that uses
tools.deps(.alpha) to read in
deps.edn files in the same way that the
clj script uses them. Updates Boot's resources, sources, and classpath based on the paths, extra paths, and classpath computed by
tools.deps. Can also update Boot's dependencies (for use by tasks like
The primary use case for
boot-tools-deps is that your project runs with
clj -- so all of its dependencies are managed via
deps.edn files, with aliases as appropriate -- and you want to bring Boot tooling to that project, in addition.
If you have an existing Boot project, the assumption is that you move all of the code-level (This use case only worked for simple Boot projects!)
deps.edn and use aliases in preference to
:scope in order to manage how dependencies are assembled -- leaving only Boot-level tooling in
:dependencies or supply those dependencies via the command-line.
You can either use this library as a command line dependency:
boot -d seancorfield/boot-tools-deps:0.4.7 deps ...
or you can add the following to your
[seancorfield/boot-tools-deps "0.4.7" :scope "test"]
and then expose the task with:
(require '[boot-tools-deps.core :refer [deps]])
or, if you have a
build.boot file, add the dependency and the
The available arguments that mirror
--config-files-- specify the
deps.ednfiles to be used
--repeatable-- use only the local
deps.ednfile (or the
-cspecified files) -- note: the
-Doption is still read and used!
--config-data-- provide an EDN string that is treated as an additional, final
--aliases-- specify aliases of any kind (equivalent to specifying
-Rall with the same alias)
--classpath-aliases-- specify the aliases for classpath additions
--main-aliases-- specify the aliases for main options
--resolve-aliases-- specify the aliases for resolving dependencies
The available arguments that are specific to
--execute-- after processing the
clojure.main/mainproviding as arguments any main-opts found by
tools.deps.alpha-- note: main-opts are only found via aliases!
--overwrite-boot-deps-- in addition to setting up the classpath (and
source-paths), overwrite Boot's
:dependencieswith those returned from
tools.deps-- note: this is only required for Boot tasks such as
uberto function correctly!
--quick-merge-- in addition to setting up the classpath etc, perform a quick and simple merge into Boot's
:dependenciesof those returned from
tools.deps-- note: this is sometimes required for certain Boot tooling to work later on in the pipeline; it cannot be used with
-Band should not be used with
ubersince it will include all your tooling dependencies as well
--verbose-- explain what the task is doing (
Specifying aliases for tasks in
You can specify different classpaths for different tasks. For example, to use the default classpath for the
(deftask build "Build and install the project locally."  (comp (deps) (pom :project 'foo/bar :version "0.1.0" ) (jar :main 'clojure.main) (install)))
And to add the
:test alias when testing:
(require '[adzerk.boot-test :as boot-test]) (deftask test "Runs tests"  (comp (deps :aliases [:test]) (boot-test/test)))
Differences from how
- The "system"
deps.ednfile is not read but
boot-tools-depsmerges in a copy taken from the
clojure/brew-installrepository so the effect should be the same. This means the default
deps.edninformation may lag behind the latest, distributed/installed version, or may be ahead of the version you actually have installed (if you have not updated
clojurerecently). The version of Clojure used is whatever version is running by the time this task is run -- you can only change that via
~/.boot/boot.properties, not via
cljcomputes the full classpath and caches it in a local file.
boot-tools-depscomputes the classpath on every invocation.
- Whatever value of
:pathscomes back from
tools.depsis used as the
:resource-pathsvalue for Boot.
- Whatever value of
:extra-pathscomes back from
tools.depsis used as the base
:source-pathsvalue for Boot. You can use Boot's
sifttask to treat them as resources instead.
- Any additional folders found on the computed classpath produced by
tools.depsare added to the
:source-pathsand any JAR files on the computed classpath are added directly to Boot's in-memory classpath. Boot's
:dependenciesare not updated by default.
clojure.mainis only executed if you specify the
cljalways runs this).
- In order to run tasks that depend on Boot's
:dependencies, such as
uber, you need to specify either the
-Boption to overwrite Boot's
:dependencieswith the computed dependencies produced by
-Qoption to merge the computed dependencies into Boot's
:dependencies. Note: transitive dependencies do not inherit the
:scopeof the dependency that caused them to be included!
- 0.4.7 -- 12/06/2018 -- Merge
:repositoriesin Boot (to address #24).
- 0.4.6 -- 10/05/2018 -- Update to
tools.deps.alpha0.5.452 (to add authenticated repo support -- @cbowdon).
- 0.4.5 -- 04/08/2018 -- Update to
tools.deps.alpha0.5.417 (which should suppress the slf4j warnings).
- 0.4.4 -- 04/07/2018 -- broken release
- 0.4.3 -- 02/23/2018 -- Update to
tools.deps.alpha0.5.398 (this removes the version range check).
- 0.4.2 -- 02/14/2018 -- Update to
tools.deps.alpha0.5.373; only pull in a more recent version of Clojure for the pod if actually necessary; add
:extensionto modifiers that
boot-tools-depspasses back from
tools.deps.alpha(#20; in addition to
- 0.4.1 -- 02/02/2018 -- Fix
-Doption (broken in 0.4.0).
- 0.4.0 -- 02/02/2018 -- Destroy pod inline instead of in a future; update to
tools.deps.alpha0.5.351; add support for
- 0.3.0 -- 02/02/2018 -- Add
-Q(quick merge) for Boot's
:dependenciesto better support certain tool chains (#15); refactor
tools-depsto match arguments for
load-depsfor easier reuse as a library (#11); update docstrings (to match current usage and explain it better); updated README to better clarify intended usage (#12).
- 0.2.3 -- 01/31/2018 -- Ensure pod environment gets recent version of Clojure (@superstructor).
- 0.2.2 -- 01/29/2018 -- Refactor pod code to a separate namespace to make the code easier to work with (@superstructor).
- 0.2.1 -- 01/29/2018 -- Make Clojure a
:provideddependency for consistency (@superstructor).
- 0.2.0 -- 01/28/2018 -- Update to use the most recent
tools.deps.alpharelease; directly update the Boot classpath (which means Git and Local dependencies are now supported!); run
tools.depsinside a Boot pod; no longer update Boot's
- 0.1.4 -- 12/06/2017 -- Fix #3 by updating
brew-install(changes Clojars repo URL); fix #4 by correcting how
-coptions affect the list of
deps.ednfiles used; switches from
HOMEenvironment variable to
user.homesystem property; adds
-Aoption for when you need the same alias on both
-C; now relies on
tools.deps.alpha.makecploading all the specific providers (instead of loading them manually).
- 0.1.3 -- 11/15/2017 -- Fix #2 by using
brew-installrepo as defaults.
- 0.1.2 -- 11/13/2017 -- Expose
depstask machinery as a function,
load-deps, for more flexibility.
- 0.1.1 -- 11/12/2017 -- First working version.
Copyright © 2017-2018 Sean Corfield, all rights reserved.
Distributed under the Eclipse Public License version 1.0.