Skip to content

Setting Clojure version

Juho Teperi edited this page Jun 14, 2015 · 14 revisions

There are two ways to set which Clojure version Boot is using:

  1. Globally using BOOT_CLOJURE_VERSION environment variable
  2. Per project using boot.properties file

This sets the Clojure version for root classloader, which means it is used by anything your do outside of pods (e.g. repl).

Additionally in your application you should also add a dependency to the same Clojure version. This is because else it is possible that your dependencies have transitive dependency to Clojure causing that version to be used instead of one defined by BOOT_CLOJURE_VERSION.

(set-env!
  :dependencies [[org.clojure/clojure "1.7.0-RC"]])

Per project

You can create the boot.properties file using following command:

$ boot -V > boot.properties

And then editting the file to contain proper Clojure version:

#https://github.com/boot-clj/boot
#Sat Jun 13 17:56:35 EEST 2015
BOOT_CLOJURE_VERSION=1.7.0-RC1
BOOT_VERSION=2.1.2

Note: When using boot.properties file you have to also pin the project to specific Boot version as the file must specify both variables.

Clone this wiki locally