ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: setting source version in war file
Date Thu, 04 Jan 2007 10:22:50 GMT

put the version in the Manifest file


as Jan already suggested

you may also put the versionstring in the header of some html/jsp file
make it visible for the user/tester of your webapp

if you want to read the Versionstring out of your
Manifest later you could go with a little script =

Manifest:mf may look like :

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.4.2_05-b04 (Sun Microsystems Inc.)
Build-By: buildmaster
Specification-Title: MyApp Extended
Specification-Version: v_1.0

and get it with :

<script language="ruby"><![CDATA[
         pattern = /^Spec.+V.+:(.*)$/'path/to/your/MANIFEST.MF').each do |line|
            if md = line.match(pattern)
                puts 'Version = '<<md[1].strip
	     # make version available for further ant processing

Regards, Gilbert

-----Original Message-----
From: Raghu [] 
Sent: Thursday, January 04, 2007 10:35 AM
Subject: setting source version in war file

It is required for me to identify the source version of my war file.


Test.war    -   1.0 version
Test.war    -   1.1 version
Test.war    -   1.2 version

Imagine I made war file from build.xml.
This war file if unjared then from manifest file I need to identify the
version of source code.

so, How to set the source version to my war file ?

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message