ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Melissa Marquis" <mmarq...@empactsolutions.com>
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="build.properties"/> 
  		<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}" />
  		</propertyfile> 
	</target> 

My build.properties 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 build.properties file: 
stats.eyeQversion=2.0



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


Hi

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="${version.no}"/>


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.

Matt



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message