A simple maven wrapper over leiningen 2.X
Clone or download
abailly Merge pull request #1 from hlprmnky/master
Add tag file to allow leinTest.setUp to succeed (line 36)
Latest commit bc5a673 Sep 7, 2014
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Add tag file to allow leinTest.setUp to succeed (line 36) Aug 28, 2014
README.md can set the build directory where lein is downloaded and executed Oct 4, 2013
pom.xml test mojo, fix mock tests and use jdk7 Sep 30, 2013


A maven plugin that wraps leiningen build tool.

Getting Started

  1. Download & build source code (assume git and mvn are in your PATH):

    git clone https://github.com/abailly/lein-maven-plugin.git
    cd lein-maven-plugin
    mvn install
  2. Configure your project to use the plugin.

  3. Run maven in your project with suitable target:

    mvn compile
    [INFO] --- lein-maven-plugin:1.0-SNAPSHOT:lein (default) @ colonel-train ---
    [INFO] using default system utilities provider
    [INFO] downloading https://raw.github.com/technomancy/leiningen/stable/bin/lein.bat to lein.bat
    [INFO] lein.bat exists, skipping download
    [INFO] downloading https://leiningen.s3.amazonaws.com/downloads/leiningen-2.3.2-standalone.jar to leiningen-2.3.2-standalone.jar
    [INFO] leiningen-2.3.2-standalone.jar exists, skipping download
    [INFO] lein deps...
    [INFO] done
    [INFO] lein run...
    INFO  org.eclipse.jetty.server.Server - jetty-7.6.1.v20120215
    INFO  org.eclipse.jetty.server.AbstractConnector - Started SelectChannelConnector@

Public repository access

If you don't want or cannot build the plugin yourself, a binary version is available from Dropbox. Add the following repository definition to your pom.xml or settings.xml file:


Thanks to http://code.google.com/p/peter-lavalle/wiki/MavenOnDropBox for the idea.

Configuration details

This simple mojo wraps leiningen execution with maven. It is extremely dumb, simple and dirty:

  • download leiningen uber-jar,
  • download platform-dependent script,
  • run lein repeatedly for each given do element.

Current help is always available inline with the following command (assuming plugin group foldlabs is configured in settings...):

mvn lein:help -Ddetail

Available parameters:


Sets environment variables to pass to underlying processes. Each leiningen execution will be run in an environment with all this configured variables set. Of course the variables content may use maven properties.

leinVersion (Default: 2.3.2)

Defines which leiningen's version to use. Required: Yes

targets (Default: compile)

Sets leiningen's tasks to execute. Each task will be executed in sequence. Default task is compile. For example:


This instructs plugin to run deps task followed by run task.

CAVEAT: Note each task is run in a sub-process of the current maven process. If the current process is killed while sub-processes are still alive, this will create orphan processes that must be killed manually. Required: Yes