Package with Clojure tools.buildλ︎
The Clojure.org tools.build project is used to build jar files to deploy libraries and uberjar files to run deployed projects (e.g. in Docker containers or directly on an Operating System with Java JVM installed).
Clojure tools.build is a library to define build related tasks using Clojure code.
Practicalli Project Templates includes tools.build configuration
Clojure projects created with Practicalli Project Templates include a build.clj
configuration to build an uberjar of the project.
The make build-jar
runs the clojure -T:build jar
command to build an uberjar.
Java ARchive - jar file
A .jar
file is a zip archive of the project containing all the files for running a Clojure project. The archive should contain metatdata files such as Manifest and pom.xml and can contain Clojure sources or compiled class files from the project (or both).
An ubjerjar is .jar
file that also contains all the project dependencies including Clojure. The uberjar is a self-contained file that can be easily deployed and requires only a Java run-time (Java Virtual Machine), using the java -jar project-uberjar.jar
command, with the option to pass arguments to the Uberjar also.
Practicalli Project templates include a build.clj
configuration with jar
and uberjar
tasks.
Create a runnable Clojure archive
Create a Clojure library archive
tools.build provides an API for pragmatically defining tasks to build Clojure projects.
Create a build.clj
configuration with tasks for building a library jar or runable uberjar.