-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify introduction and highlight package tasks available in Practicalli Project Templates Update presentation of tools.build examples
- Loading branch information
1 parent
d624bef
commit 3869ec4
Showing
3 changed files
with
114 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Package with Clojure tools.build | ||
|
||
The [:globe_with_meridians: Clojure.org tools.build project](https://clojure.org/guides/tools_build) 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](tools-build.md) is a library to define build related tasks using Clojure code. | ||
|
||
|
||
??? HINT "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 Build tasks" | ||
[:fontawesome-solid-book-open: Practicalli Project templates](/clojure/clojure-cli/projects/templates/) include a `build.clj` configuration with `jar` and `uberjar` tasks. | ||
|
||
Create a runnable Clojure archive | ||
|
||
!!! NOTE "" | ||
```shell | ||
clojure -T:build uberjar | ||
``` | ||
|
||
Create a Clojure library archive | ||
|
||
!!! NOTE "" | ||
```shell | ||
clojure -T:build jar | ||
``` | ||
|
||
=== "Clojure tools.build" | ||
|
||
[tools.build](tools-build.md) 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. | ||
|
||
[:fontawesome-solid-book-open: Define build.clj configuration for tools.build](tools-build.md){target=_blank .md-button} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters