There are a number of tools from the Clojure community which add build tool features to the Clojure CLI tools. This enables developers to have a very lightweight and customisable set of tools that just do what they need.
This article just covers the very basics of each tool, see each projects documentation to get the full benefit of each tool.
- depot finds newer versions of libraries (from Clojars and Git repositories)
- kaocha full featured next gen Clojure test runner
- depstar to package up your application for the JVM platform
Please see earlier articles in this series for background:
- Experimenting With Clojure CLI Tools Options
- A Deeper Understanding of Clojure CLI Tools
- Getting Started With Clojure CLI Tools
depot - find new library versions
depot will look for newer versions of the maven (clojars, maven central) and git dependencies in the project
Install depot by adding an alias to the project
deps.edn file or
To automatically update the dependency, add the
Show the outdated dependencies with
Automatically update the dependencies with
koacha test runner
koacha is a new test runner that works with Clojure CLI tools, Leiningen and Boot. Kaocha understands different types of tests including clojure.test, ClojureScript, Cucumber, Fudje, Expectations, allowing all tests to be handled in the same way. This test runner also produces very useful reports using pretty printing so its easy to get meaning from them.
Install by editing your
deps.edn file and add an alias for kaocha
Create a wrapper script called
Create a tests.edn file at the root of the project. Start with a default configuration by just adding the following line:
Read the detailed documentation to get the most out of Kaocha.
depstar creates a jar of your application or uberjar that also includes the Clojure library and can be deployed directly on the JVM platform. depstar does not ahead of time (aot) compile your project.
:depstar alias to the project
$HOME/.clojure/deps.edn to make depstar available for all projects.
Create a jar or uberjar file using the respective command:
--verbose after the filename lists all the files that are added to the jar file.
Add web assets into an uberjar by including an alias in your deps.edn:
Then invoke depstar with the chosen aliases:
An uberjar is run using the command:
- clj-kondo linter written in Clojure with GraphViz based dependency graph and other tools
- juxt.pack to package your applications as a jar, uberjar, clojars, maven, lambda and docker
- lein-tools-deps - dependencies with Leiningen
- aka is for sharing aliases (not very clear what that means or why its useful - see project)
- Plum is a tool for managing Clojure projects - a wrapper for several community projects.
- version-clj Clojure & ClojureScript library for analysis and comparison of artifact version numbers (used by depot)
- Meyvn enables you to generate uberjars (executables) and jars (libraries), and to deploy them on remote servers, e.g. Clojars
- jet - CLI to transform between JSON, EDN and Transit, powered with a minimal query language.
Visit Sean Corfield’s dot-clojure repository for more tools and how to configure them with Clojure CLI tools.
- Clojure CLI projects from scratch Oli.me.uk
- Clojure on Heroku now supports Clojure CLI tools.
- Clojure deps.edn - a basic guide
- Moving to deps.edn and shadow-cljs
- a streamlined template for developing a new Clojure+Clojurescript web application with the Clojure CLI tools
This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License, including custom images & stylesheets. Permissions beyond the scope of this license may be available at @jr0cket