Skip to main content

Clojure

This guide will help build Clojure projects on Semaphore.

Overview

The Leiningen tool is pre-installed in Linux machines. You can switch the active interpreter using sem-version.

How to switch Clojure versions

Leiningen reads the Clojure version number from project.clj. The correct version is activated automatically.

For example the presence of this project file activates Clojure v1.10.0:

(defproject hw "0.1.0-SNAPSHOT"
:main two.core
:dependencies [[org.clojure/clojure "1.10.0"]])

How to run Leiningen

To run a Clojure project with Leiningen, use the following commands in a job:

checkout
lein run