leiningen - the clojure build tool
So I worked a bit with clojures build tool - I think that is how that kind of software is called - leiningen. It is a great tool even so it has some rough edges (most of them should be fixed with the next releases). A big advantage of it is that it is quite simple most of the tasks you do with lein 'just work' which is something I like a lot :P.
So I leiningen also alows more complex stuff, namely extending it with plugins. There are some very nice plugins but often people don't know about them so I figured, I go and try them out to see how they work. I will not be able to give detailed infos for the more specific plugins since I have no usage case for them.
lein-nailgun
From the webpage
A leiningen plugin to launch a vimclojure nailgun server.
Sadly I don't use thlein-nailgun adds the lein nailgun command.
lein-javac
From the webpage:
A javac plugin for Leiningen. It allows you to compile .java files in the src directory of the project. The compiled classes will be outputed to the classes directory of the project.
lein-gae
This plugin is used to create a war file that can be deployed to the Google App Engine. You get the command lein appengine-setup which creates a war directory with all the compiled classes and things.
I dind't deploy it but it seems easy enough to me.
WARNING
the appengine-setup will change your project.clj add some dependencies and aditional keys.
leiningen-war
lein war seems to give you the usual lein jar and lein uberjar commands with war files (java web archive) So adding this plugin you get lein war and lein uberwar. The webside gives a very detailed tutorual and from what I can tell this is a very nice pice of work. It also seems to allow you to do the same as lein-gae by creating appengine compatible war's.
Note:
Install the dep from uk.org.alienscience/leiningen-war not leiningen-war.
lein-scripts
This plugin lets you run scripts. It takes all files in the scripts directory and executes them. Simple and working. So one warning make sure to give them executable rights or lein scripts will throw ugly java arrays.
lein-cuke
I cancled after the jruby jar took over 10 minutes to download :(. Regarding to the webpage you can use the cocumber test framework with this lein extension. For those who don't know cucumber is a ruby framework to run specs.
Note:
Install the dep from org.clojars.wilkes/lein-cuke not line-cuke.
Also this depends heaviely on other jars, that includes 11MB of jruby.
lein-remote-swank
From the webpage:
This Leiningen plugin lets you launch a swank server on a remote machine via Leiningen.
Sadly I could not test it since it failed to find rsync but the documentation on the webpage seems quite well done and extensive.
lein-diagnostics
This plugin is quite simple but very nice. It installs without any further dependencies and gives you the lein diagnostics command that will show you basic diagnostics info about your current project and leiningen setup. This includes versions pathes and information about the java VM.
lein-clojars
lein-clojars is a plugin for leiningen that alows easy deployment of jars to the clojars maven repository. Ewww there I sayed the M-Word. But jokes aside it is a very simple tool that hides about everything I dislike about maven behind a few inches of steel. If you plan to release jars to the wield this is your friend.
The usage is simple, you've to create a account on clojars and then simply use lein push to push your jar to the. Done!
lein-swank
From the webpage:
This plugin lets you launch a swank server via Leiningen. Simply add [leiningen/lein-swank "1.1.0"] to your :dev-dependencies in project.clj and run "lein swank" to start the server.| Then from Emacs run M-x slime-connect to connect to your project. It is very helpful for the ECLIPS people out there.
lein-eclipse
Did not found much about this plugin but the jar describs it as:
A leiningen plugin to create Eclipse project descriptor files.lein-search
Hah finally I can tell you a lot about this one - hence it's mine :P - Well the idea is to make handling dependencies easiely. For example for all the test above I used it to get the latest versions of the librariy.
I think the best example is how I used it in this article. I careted a new lein project with lein new then I added [lein-serach "0.3.0-SNAPSHOT] to the project.clj (that was the only time I had to touch the project.clj!).
lein deps got the lein-search jar from clojars. I could skip the lein update-repo (which fetches the newest index from clojars.org) since I ran it earlyer today and it is user local. After that it was quite easy.
lein search -v <string> - allowed me to figure that some of the lein plugins are newer under org.clojars.* group id.
lein add <artifact> or lein add <artifact> - allowed me to add the newest stable version (or the unstable one) to leins project.clj.
Well so much about leiningen for now. It is a very good tool in my eyes and nice to use.
Trackbacks
Use the following link to trackback from your own site:
http://blog.licenser.net/trackbacks?article_id=60
