This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-13
Channels
- # announcements (18)
- # babashka (52)
- # beginners (47)
- # calva (45)
- # clj-kondo (31)
- # clojure (18)
- # clojure-brasil (2)
- # clojure-europe (3)
- # clojure-sweden (25)
- # clojurescript (19)
- # cursive (15)
- # datalevin (11)
- # defnpodcast (2)
- # duct (1)
- # editors (1)
- # emacs (6)
- # gratitude (1)
- # introduce-yourself (6)
- # jobs-discuss (11)
- # leiningen (3)
- # lsp (10)
- # luminus (2)
- # off-topic (4)
- # podcasts-discuss (2)
- # reitit (2)
- # shadow-cljs (10)
- # sql (9)
- # xtdb (4)
I'd like to inject a version including build number when building an uberjar — preferably as a Java property (so that (System/getProperty "my-version-prop")
in the built uberjar will return a value that I specified when building). Is there a way to do this?
There is no way to “set” a Java system property - that's a property st runtime. The only way to do this would be to run code from the uber main that did System/setProperty. Another option would be to generate a resource included in the uberjar and then read the resource (that's how something like *clojure-version*
works)
Not sure if https://github.com/trptcolin/versioneer would be helpful to you here either.