Welcome! Please see the About page for a little more info on how this works.

0 votes
ago in Clojure CLI by

The example given in https://clojure.org/guides/tools_build#_compiled_uberjar_application_build also copies all source files from the src folder into the uberjar. As I understand it, this is not strictly required for a compiled application? In my scenario where I don't want to distribute my source code along with the uberjar, can I simply not copy or exclude clojure source code? Or does that have subtle side effects? Why would I want source code in my uberjar to begin with?

1 Answer

0 votes
ago by
selected ago by
 
Best answer

If you have compiled your Clojure source into classes, then you can just distribute the .class files in the uberjar. In that tools.build example, you can simply omit "src" from the copy-dir call (or omit the call entirely if you have no "resources" to copy).

...