I'm using Jenkins to fill with Maven build number in manifest.mf in jar. Jar is in war.
Now I try to read those properties but no luck. I've tried different methods, from basic like: this.getClass().getPackage().getSpecificationVersion() (returns null) to much complicated: domain.getCodeSource().getLocation().openConnection().getInputStream().getManifest(). Lately I've tried to use VFS like: VFS.getChild(url).getChild(JarFile.MANIFEST_NAME).asFileURL() but still it doesn't work (it works only in exploded deploy). Does Seam has some utility to help me? Maybe anybody know how to do this properly?
Here is something about VFS: https://community.jboss.org/message/529846
Looks like you could try something like http://stackoverflow.com/questions/3777055/reading-manifest-mf-file-from-jar-file-using-java