-
-
Notifications
You must be signed in to change notification settings - Fork 180
Boot Environment
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
, ornil
if thekey
is not found. - (get-env key not-found)
-
Returns the value associated with the given
key
, ornot-found
if thekey
is not found. -
(set-env! key val & kvs)
-
Sets the values for the given
key
s. 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
andread-string
.
(set-env! :source-paths #{"foo" "bar"})
(set-env! :source-paths #(conj % "baz"))
- :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 containwagons.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).
You can find other developers and users in the #hoplon
channel on freenode IRC or the boot slack channel.
If you have questions or need help, please visit the Discourse site.
- Environments
- Boot environment
- Java environment
- Tasks
- Built-ins
- Third-party
- Tasks Options
- Filesets
- Target Directory
- Pods
- Boot Exceptions
- Configuring Boot
- Updating Boot
- Setting Clojure version
- JVM Options
- S3 Repositories
- Scripts
- Task Writer's Guide
- Require inside Tasks
- Boot for Leiningen Users
- Boot in Leiningen Projects
- Repl reloading
- Repository Credentials and Deploying
- Snippets
- Troubleshooting
- FAQ
- API docs
- Core
- Pod
- Util