1

I have to fetch implementation version of web application from manifest.mf file. I have made the changes in pom.xml

<configuration>
  <archive>
    <manifest>
     <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
     <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
    </manifest>
 </archive>
</configuration>

I'm fetching implementation version by code

String number = VersionInfo.class.getPackage().getImplementationVersion();

But the code returns value null. Problem is I don't want to fetch this value by reading manifest.mf from META-INF folder using Stream.

Is there any way to find this value from Application context?

Sai prateek
  • 11,842
  • 9
  • 51
  • 66
  • There are 2 links help you http://stackoverflow.com/questions/3777055/reading-manifest-mf-file-from-jar-file-using-java. For spring context http://stackoverflow.com/questions/1272648/reading-my-own-jars-manifest – bobs_007 Jun 30 '15 at 06:39
  • Do you have the fillme tag filled out? – Derrops Jun 30 '15 at 06:42
  • addDefaultImplementationEntries attribute is adding the implementation version value in manifest.mf ,problem in fetching of value . Why should I add version in pom.xml ? – Sai prateek Jun 30 '15 at 06:45

0 Answers0