In some projects, it's desirable to get the version of a given project, often the same project being developed. This is used in web-app for example to show the current version.
When running from a lein based project, the following java interop call works:
(System/getProperty "<artefactId>.version")
Where <artefact-name> is the same as the artefactId in maven parlance (i.e in clojure projects configured with lein, it's the value "VERSION" we want from (defproject groupID/artefactId "VERSION").
When running from JAR file, this doesn't work; but there are other work-arounds/methods for obtaining the version.
We should an API to psuedoace.utils for getting this, such that we don't have to repeat ourselves if we need this feature in > 1 project.
In some projects, it's desirable to get the version of a given project, often the same project being developed. This is used in web-app for example to show the current version.
When running from a
lein
based project, the following java interop call works:(System/getProperty "<artefactId>.version")
Where
<artefact-name>
is the same as theartefactId
in maven parlance (i.e in clojure projects configured with lein, it's the value "VERSION" we want from(defproject groupID/artefactId "VERSION")
.When running from JAR file, this doesn't work; but there are other work-arounds/methods for obtaining the version.
We should an API to psuedoace.utils for getting this, such that we don't have to repeat ourselves if we need this feature in > 1 project.
Primarily motivated by, and intended to fix this.