I have a rest endpoint used to return information about application (so far only app version) But so far this info is hardcoded, and it\'s pretty easy to forget to change it
You better use build-in manifest.
new Manifest(Application.class.getResourceAsStream("/META-INF/manifest.mf"))
For the concrete impl-version:
new Manifest(Application.class.getResourceAsStream("/META-INF/manifest.mf"))
.getMainAttributes()
.get(Attributes.Name.IMPLEMENTATION_VERSION)
Using maven do not forget to create the manifest using:
org.apache.maven.plugins
maven-jar-plugin
2.4
true