1 Reply Latest reply on May 30, 2012 8:24 PM by Jason Porter

    Reading manifest.mf

    marx3 Apprentice

      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