Showing posts with label Jenkins. Show all posts
Showing posts with label Jenkins. Show all posts

Thursday, August 30, 2012

How to know the version of the java/j2ee application deployed?



Many occasions, you might have come across the circumstances where you may want to know the version of the application deployed for particular instances like System testing, UAT and production. Possible situations are,
1. As part of post deployment activity, you may wanted to ensure the whether the deployed build(s) is successfully deployed or not.
2. To see the version of the build deployed in production (to know the stable version of the build). You might have seen many open source applications for this. 

Ant target to achieve the same:


Java Class file that can read the MANIFEST.MF file attributes:
Code is self explanatory.   We have a small piece of Code to get the ServertContext from FacesContext.  If you are not using JSF, replace with relevant code base.





JSF presentation file used to display the MANIFEST.MF file attributes:
Below is the design view of the presentation. Bean attribute values will be populated using VersionInfoMFReader.java class file as mentioned above. Here, presentation values will be populated from the bean as below.




We have implemented the above version info reader in our application. Sample application screen print attached below. 







Pega Decisioning Consultant - Mission Test Quiz & Answers

The Pega Certified Decisioning Consultant (PCDC) certification is for professionals participating in the design and development of a Pega ...