a clj-based uberjarrer (forked from healthfinch/depstar and enhanced)
Install this tool to an alias in $PROJECT/deps.edn or $HOME/.clojure/deps.edn:
{
:aliases {:depstar
{:extra-deps
{seancorfield/depstar {:mvn/version "0.2.3"}}}}
}
Create an uberjar by invoking depstar with the desired jar name:
clojure -A:depstar -m hf.depstar.uberjar MyProject.jar
Create a (library) jar by invoking depstar with the desired jar name:
clojure -A:depstar -m hf.depstar.jar MyLib.jar
If you want to see all of the files that are being copied into the JAR file, add -v or --verbose after the JAR filename.
depstar uses the classpath computed by clojure.
For example, add web assets into an uberjar by including an alias in your deps.edn:
{:paths ["src"]
:aliases {:webassets {:extra-paths ["public-html"]}}}
Then invoke depstar with the chosen aliases:
clojure -A:depstar:webassets -m hf.depstar.uberjar MyProject.jar
Note that depstar does no AOT compilation and does not add a manifest to the jar file. You can run the uberjar as follows
(assuming project.core is your main namespace):
java -cp MyProject.jar clojure.main -m project.core
depstar can be used to build JARs for older projects.-v/--verbose option to display files added to the archive; Fix #9 properly by creating parent directories prior to move of JAR file.*.pom files; Fix #7 by excluding module-info.class files; lists excluded files if debugging enabled.data_readers.clj (do not close input stream!); supports -Ddepstar.debug=true and DEPSTAR_DEBUG=true to be more verbose.data_readers.clj; hf.depstar.jar namespace added.The use and distribution terms for this software are covered by the Eclipse Public License 2.0
Can you improve this documentation? These fine people already did:
Sean Corfield, Ghadi Shayban, Gert Goet & ⅅ₳ℕⅈⅇℒℒⅇ ҜⅇℱℱʘℝⅅEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |