Maven plugin that runs a clojure REPL or starts a swank server in the context of the current maven project.
Java Clojure
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Maven Clojureshell

Tired of managing lib directories packed with jar files for you different clojure projects? This little maven plugin offers a simple way of running a clojure REPL in the context of a maven project; which means that maven will manage all your dependencies for you, downloading missing jars and upgrading to newer versions when necessary. All dependencies in the runtime scope will be automatically added to the classpath and available to the clojure process.

Note: clojureshell is just that; a simple plugin for running clojure. If you need something more more sophisticated for compiling and packaging clojure code I suggest you take a look at the clojure-maven-plugin project.


Install the plugin (see below), then navigate to the root directory of a maven project and execute the the follow command:

mvn clojureshell:repl

This starts an interactive clojure shell (the current clojure version is 1.0.0). Functionality is pretty bare right now; you might want to use rlwrap or jline to enhance your hacking experience.


Thanks to the wonderful swank-clojure project, you have another option if you want to run clojure with emacs (and who doesn't?). Typing

   mvn clojureshell:swank

starts a swank server for the current project, and you can connect to it from emacs with M-x slime-connect as usual. The default port is 4005, but can be changed with the -Dclojure.swank.port option.

Options and configuration

Clojureshell currently supports the following options that can be configured as system properties:

Property Default value Description
cp Additional resources that should be added to the classpath. Follows the regular java classpath syntax, but doesn't understand the dir/* idiom.
clojure.scope runtime The maven scope that whose dependencies should be added to the classpath. Possible values: runtime and test.
clojure.includeStdDirs true If true, the standard directories src/main/clojure and src/test/clojure will be added to the classpath (although the latter is only applicable only if clojure.scope=test).
clojure.swank.port 4005 Only applicable for the clojureshell:swank target. The port number that the Swank server should listen to.
clojure.swank.file $TEMP/swank Only applicable for the clojureshell:swank target. Determines which file Swank should use for dumping connection info.

Global installation

The easiest way to get started using clojureshell is to open up (or create) your maven settings.xml file and add the following sections:


This will give you access to clojureshell in /any/ maven project.

Project-specific installation

To enable clojureshell for use in a single project, add the following lines to that project's pom.xml:

        <name> Maven Repository</name>

In order to avoid having to spell out the qualified plugin name (which is nu.mull:clojureshell-maven-plugin) every time you invoke it, you may also want to add the following to you settings.xml file:


Building instructions

You don't need to compile Clojureshell yourself in order to use it, but in case anyone's interested, here is the procedure to compile and install the plugin in your local repository:

  1. git clone git://
  2. cd clojureshell-maven-plugin
  3. git submodule init
  4. git submodule update
  5. mvn install


Clojureshell is licensed under the GNU Public License v3.