leiningen

wombawomba 2022-02-13T12:45:57.781979Z

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?

Alex Miller (Clojure team) 2022-02-13T13:51:54.155529Z

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)

2022-02-13T15:18:59.063029Z

Not sure if https://github.com/trptcolin/versioneer would be helpful to you here either.