On Fri, 31 Aug 2001 15:36, Sachin Shah wrote:
> Hi,
>
> I have an application developed i want to incorporate the version and build
> information within the application such that everytime i release the
> application i can get the exact version and build information. does any one
> has idea how to implement this. Is this possible using ant. if yes can
> anyone has code to do the same.

The way I do it is to place version information in the Jar according to 
package standard and then extract it via java.lang.Package object or 
alternatively (and much more simpler) is to define some constants somewhere. 
I usually do something like

interface Constants
{
  String VERSION = "@@VERSION@@";
  String DATE = "@@DATE@@";
}

and then replace the constants during build process. See Ants build process 
for examples of that.

-- 
Cheers,

Pete

--------------------------------------------------
you've made a dangerous leap right over common 
sense, like some kind of metaphysical Evil Knievel
--------------------------------------------------

Reply via email to