ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Melissa Marquis" <>
Subject RE: Updating Manifest Files
Date Thu, 24 Jul 2003 13:36:49 GMT
I have been doing the following: 

<target name="build-stats-core" description="Records build statistics for CORE build in
build.stats file"> 
	   	<loadproperties srcFile=""/> 
  		<propertyfile file="${logs.dir}/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.core.lastbuild" value="now" type="date"/> 
    		<entry key="stats.manifest.dir" value="${etc.dir}" />

This updates a file in my log directory that ends up looking like this 
after the target runs: 

#Number Builds
#Fri Jul 11 13:02:21 EDT 2003
stats.core.lastbuild=2003/07/11 13\:02

This target is run when we do an actual release (not just a developer build). 

I have a file called manifest.template that looks like: 
Build-Date: @build_date@
Specification-Title: EyeQ 2
Specification-Version: @version@
Specification-Vendor: Empact Solutions, Inc.
Implementation-Title: @impl_title@
Implementation-Version: build @build_no@ 
Implementation-Vendor: Empact Solutions, Inc.

The following target is called when I am building out a jar for release: 

<target name="prepare-core-manifest" depends="build-stats-core" description="Uses /log/build.stats
to update CORE build stats for /etc/">
	<loadproperties srcfile="${logs.dir}/build.stats"/> 
		<filter token="build_date" value="${stats.core.lastbuild}" /> 
		<filter token="version" value="${stats.eyeQversion}" /> 
    	<filter token="build_no" value="${stats.core.buildno}" /> 	
    	<filter token="impl_title" value="CORE Engine" />	
     	<copy file="manifest.template"
        	filtering="true" /> 

I got most of these tips from the Ant Developers Handbook - great source. 

Hope this helps! 

Melissa A. Marquis
Senior Software Engineer
Empact Solutions, Inc. 

-----Original Message-----
From: Vikas Phonsa []
Sent: Wednesday, July 23, 2003 8:47 PM
To: 'Ant Users List'
Subject: Updating Manifest Files

I am using ant to make jars and am specifying a Manifest File to be used in
the jars.
How can have ant to automatically update the Manifest File every time I do a
build so that the Manifest file would have the current time stamp as the
Version Number/Tag of the jars to be created.

Any ideas,Help


-----Original Message-----
From: David Knox [] 
Sent: Wednesday, July 23, 2003 5:07 PM
To: 'Ant Users List';
Subject: RE: Trying to get rid of makefiles

Hi Leonardo,
>From my experience using Ant for the past few years, I've found that Ant
will actually be faster because it calls the Java compiler once for all
files in a <fileset> whereas implicit rule processing in make will call
the compiler once per file. 

--hope this helps

> -----Original Message-----
> From: Leonardo Abreu de Barros []
> Sent: Wednesday, July 23, 2003 5:02 PM
> To:
> Subject: Trying to get rid of makefiles
> Hi all,
> I work in a company that has a long history using makefiles. Since I
> joined it, I proposed to migrate to Ant. Some people resist to
> changes, some people agree, as long as all benefits provided by the
> makefiles are covered by Ant.
> I've already reproduced all behaviors but one: currently, all java
> classes names are declared explicitly in the makefile, and sent to
> the java compiler. It rebuilds all the class files, at each build.
> They want this behavior in order to detect broken code, due to
> changes on a base class, for example.
> The problem is that Ant, specifically the <javac> task, only
> recompiles ".class" if the timestamp differs from the related ".java"
> file. I've read on documentation that to detect this kind of broken
> dependencies, you should perform "clean builds" from time to time.
> I proposed this solution, but it wasn't accepted. They think it's a
> loss of time (even if it's ridiculous) to delete all ".class" files
> before calling the compiler. If I'm not able to reproduce this
> behavior with Ant, they prefer to keep the makefiles.
> Does anyone have any idea of how I could reproduce this behavior
> using Ant? Any other possible solution?
> Thanks in advance,
> Leonardo Barros
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

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

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

View raw message