Fork me on GitHub

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)13:02:54

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 would be helpful to you here either.