Kevin Nuckolls asked if the Swank server I set up using Maven in my previous post can be started using Leiningen instead. The answer is yes. It’s very simple, in fact.
You don’t need Maven, Git, or even to manually install Incanter. You just need to install Leiningen, as described in this post, and then create a project directory containing the following project.clj file:
(defproject incanter-swank "0.1.0" :description "A Swank Server for Incanter" :dependencies [[incanter "1.0-master-SNAPSHOT"]] :dev-dependencies [[leiningen/lein-swank "1.0.0-SNAPSHOT"]])
Next download Incanter and its dependencies with Leiningen,
$ lein deps
and start a Swank server.
$ lein swank
Now connect to it from Emacs using
M-x slime-connect, as described in my previous post and that’s it.
[NOTE: The first time you build this project, you may see a error message like, java.util.zip.ZipException: duplicate entry. This is a problem I’ve recently been seeing with Leiningen builds, but the jar files that are produced are valid, and the message will not occur when starting the Swank server after the initial build. I am looking into this.]