Skip to content
Micha Niskin edited this page Dec 5, 2014 · 82 revisions

Note: This document describes features that have not yet been merged with the master branch. This is a preview of the 2.0.0-rc1 release.

The boot environment contains the current JVM classpath configuration state.

(get-env)
Returns the whole environment map.
(get-env key)
Returns the value associated with the given key, or nil if the key is not found.
(get-env key not-found)
Returns the value associated with the given key, or not-found if the key is not found.
(set-env! key val & kvs)
Sets the values for the given keys. Note that this may produce side effects, changes to the JVM's classpath, etc.

Note: Env settings must be printable and writable–the env must be able to be passed to Pods to configure them, so the env map must always be able to be round-tripped through pr-str and read-string.

Replace Env Setting With New Value

(set-env! :source-paths #{"foo" "bar"})

Update Env Setting With a Function

(set-env! :source-paths #(conj % "baz"))

Env Keys

:resource-paths
A set of path strings. These paths will be on the classpath and the files contained will be emitted as final artifacts.
:source-paths
A set of path strings. These paths will be on the classpath but the files contained will not be emitted as final artifacts.
:asset-paths
A set of path strings. These paths will not be on the classpath but the files contained will be emitted as final artifacts.
:target-path
A path string. This directory is where final artifacts will be written.
:dependencies
A vector of Maven coordinates (see pomegranate).
:repositories
A vector of Maven repositories (see pomegranate).
:wagons
A vector of Maven wagon dependencies (see :dependencies). These dependencies should contain wagons.clj files.
:local-repo
The path to the location of the local Maven repository (see pomegranate).
:offline?

When set to true dependencies will not be resolved or fetched from remote repositories (see pomegranate).

Note: this has no effect on boot's initial bootstrapping phase.

:mirrors
A map of Maven mirrors (see pomegranate).
:proxy
A map of Maven proxy configuration (see pomegranate).
:transfer-listener
A Maven transfer listener configuration (see pomegranate).
Clone this wiki locally