ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Melissa Marquis" <>
Subject RE: Getting attribute/field from a manifest file
Date Thu, 24 Jul 2003 19:53:43 GMT
You should be able to load the file and then refer to it: 

<target name="build-stats-all" description="Records calls build-web-stats and build-core-stats">

	   	<loadproperties srcFile=""/> 
  		<propertyfile file="logs/build.stats" comment="Number Builds"> 
  			<entry key="stats.eyeQversion" value="${version}"/> 
    		<entry key="stats.core.buildno" default="1" value="1" operation="+" type="int"/>

    		<entry key="stats.web.buildno" default="1" value="1" operation="+" type="int"/>

    		<entry key="stats.core.lastbuild" value="now" type="date"/> 
    		<entry key="stats.web.lastbuild" value="now" type="date"/> 
    		<entry key="stats.manifest.dir" value="${etc.dir}" />

My file records the build nos and versions.  This target 
loads it up and refers to it (read it out) via the ${} - e.g., value=${version}
comes from the following line in the file: 

-----Original Message-----
From: Matt []
Sent: Thursday, July 24, 2003 3:03 PM
To: 'Ant Users List'
Subject: Getting attribute/field from a manifest file


In my ant build script I am updating the version number manually in the
external manifest file that I am using for the jars to be made.

<attribute name="Manifest-Version" value="${}"/>

I want to write another ant script where I need to get this
"Manifest-Version" from the MANIFEST.MF file located physically in
META-INF folder in my project, to use as a tag for my versions to be put
on CVS.

How can I extract the "Manifest-Version" from the manifest file.

Please guide.


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

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

View raw message