put the version in the Manifest file
... META-INF/MANIFEST.MF
as Jan already suggested
you may also put the versionstring in the header of some html/jsp file
to
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.+:(.*)$/
File.open('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
$project.setProperty("warversion",md[1].strip)
end
end
]]></script>
Regards, Gilbert
-----Original Message-----
From: Raghu [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 04, 2007 10:35 AM
To: [email protected]
Subject: setting source version in war file
It is required for me to identify the source version of my war file.
Example:
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]