Clojure-emacs-windows
February 20th 20101. Cygwin
I use cygwin for all my unix on Windows tasks. You may use MSYS or nothing at all probably, but I will tell you here how to do thing using cygwin. Adjust accordingly.
If you want to install cygwin, go to cygwin.org and get setup.exe. Installation is pretty straightforward. If you don’t have wget check it here. Same applies to git.
2. Prerequisites.
Install wget (leiningen uses it), install git (you will need it in your projects, that’s for sure. And most public clojure projects use it). Also you’ll need Java JDK. Since we are on Windows just download it from http://java.sun.com.
3. Ant, Maven and Leiningen
Download Ant and put all its folders into your cygwin directory, so that its bin contents go to /bin, lib to /lib etc.
Download maven and put its folders into, say, /opt/maven. Then add /opt/maven/bin to your path. You DO NOT want to put mnv to /bin because of maven and cygwin specifics (it will not work, most probably).
Now get leiningen script from github (http://github.com/technomancy/leiningen/raw/1.1.0/bin/lein). Put it into /bin and run
lein self-install
Now you can create new clojure projects
lein new sample_proj
To put all dependencies in ./lib
lein deps
It will download needed jars and cache them locally in ~/.m2/
To build project
lein clean
lein uberjar
This will create a big jar which contains all dependencies including clojure and clojure-contrib.
4. Clojure box
Download and install the latest version from http://clojure.bighugh.com/ This will get you EMacs with all things configured for clojure.
Happy hacking.