Compare Clojure CLI tools With Leiningen
Leiningen has been the main tool used for Clojure projects for the last decade, however, in the last few years many new projects have started with Clojure CLI tools. Boot is a project designed to make far greater flexibiligy in configuring Clojure projects and initially was popular, however, it does require more thought to configuring a project than Leiningen. Once Clojure CLI tools started to be adopted, it seems boot interest has diminished, as Clojure CLI tools provides a great deal of flexibility without the complexity of Boot.
Clojure code is the same which ever tool is used
|Tool||Project Config||User config||Extension|
|Clojure CLI tools||deps.edn hash-map merged with user config||~/.clojure/deps.edn||aliases in deps.edn|
||~/.lein/profiles.clj||Leiningen specific plugin|
||Write the tasks required in Clojure|
Lein script or lein.bat to install, or use one of the supported package managers.
Install via package mangers or the boot.sh script
Clojure CLI tools are configured with an EDN data structure, i.e. a hash-map of key-value pairs. As this is a Clojure data structure its much easier to parse and should be very familiar to Clojure developers.
Leiningen projects are configured with a
project.clj file which contains a
defproject macro with a great many options. The Leiningen tutorial explains the options in detail. A sample project.clj contains examples of using each of this options.
Extending the tools
The projects that extend Clojure CLI tools are self-contained libraries and tools, so are not tied to any one particular tool. Any general tools written for Clojure should work with Clojure CLI tools by calling their main function (clojure main) or a specifically named function (clojure exec)
Leiningen plugin extension was the main way to extend the functionality of Leiningen (or getting pull requests accepted to the Leiningen projects).
Although there are several plugins that were widely adopted, some plugins eventually caused more confusion than benefit or were simply trivial and in the main plugins seem to have become less important to the Clojure community.