ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pritesh saharey <prit...@sqatester.com>
Subject RE: Creating a java file
Date Mon, 23 Feb 2004 14:17:07 GMT

<filter token="DATE" value="${TODAY}"/>

Sorry to trouble all you but i am unable to print the Todays date what should i do?


Pritesh Saharey
BE(Mech)
Software Engineer
Apsora(Ind.)Pvt. Ltd., Pune
http://www.apsora.com
http://in.geocities.com/priteshsaharey/



--- "Craig Berry" <Craig.Berry@portblue.com> wrote:
Just create a template VersionDate.java containing code like 
 
public class VersionDate { public static String VersionDate = "@date@";}

Then run that through a filtered copy.  Or, almost equivalently, use an <echo> to generate
the file, as others have suggested.  I'd favor the filtered-copy method as it avoids having
source code living in your build.xml.


	-----Original Message----- 
	From: Pritesh saharey [mailto:pritesh@sqatester.com] 
	Sent: Mon 2/23/2004 5:54 AM 
	To: Ant Users List 
	Cc: 
	Subject: Re: Creating a java file
	
	

	OK let us go like this, i want to create a java file VersionDate.java using ant, thsi VersionDate.java
file should contain code
	public class VersionDate { public static String VersionDate = " Mon Dec 15 17:16:45 IST 2003
";}
	
	and whenever ant command is run there this VersionDate.java file should be created with that
date on which the build is beign run for example if ant is run on Feb 23, 2004 than this date
along with code should get written in VersionDate.java file.
	
	are you clear or still need explanation if yes please please ask me
	
	
	
	Pritesh Saharey
	BE(Mech)
	Software Engineer
	Apsora(Ind.)Pvt. Ltd., Pune
	http://www.apsora.com
	http://in.geocities.com/priteshsaharey/
	
	
	
	--- RADEMAKERS Tanguy <tanguy.rademakers@swift.com> wrote:
	Then see the <echo file="xyz"> task.
	
	/t
	
	Pritesh saharey wrote:
	
	>Thanx but i wanted to create the whole VersionDate.java file and not only the date to
be displayed.
	>
	>
	>Pritesh Saharey
	>BE(Mech)
	>Software Engineer
	>Apsora(Ind.)Pvt. Ltd., Pune
	>http://www.apsora.com
	>http://in.geocities.com/priteshsaharey/
	>
	>
	>
	>--- RADEMAKERS Tanguy <tanguy.rademakers@swift.com> wrote:
	>Pritesh,
	>
	>Take a look at FilterSets in the manual, under "Concepts and Types".
	>
	>/t
	>
	>
	>Pritesh saharey wrote:
	>
	> 
	>
	>>Hello All,
	>>       A very simple problem for you, i would like to create a java file using ant
in which i want to a code something like this
	>>//----------------
	>>public class VersionDate { public static String VersionDate = " Mon Dec 15 17:16:45
IST 2003 ";}
	>>//----------------
	>>In this java code VersionDate="" should be the date of running the build script.
	>>
	>>can anybody help me out.
	>>
	>>
	>>Pritesh Saharey
	>>BE(Mech)
	>>Software Engineer
	>>Apsora(Ind.)Pvt. Ltd., Pune
	>>http://www.apsora.com
	>>http://in.geocities.com/priteshsaharey/
	>>
	>>
	>>_____________________________________________________________
	>>Join SQAtester.com Community  ---> http://www.sqatester.com/testersarea/joinus.htm
	>>
	>>---------------------------------------------------------------------
	>>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
	>
	>
	>
	>_____________________________________________________________
	>Join SQAtester.com Community  ---> http://www.sqatester.com/testersarea/joinus.htm
	>
	>---------------------------------------------------------------------
	>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
	
	
	
	_____________________________________________________________
	Join SQAtester.com Community  ---> http://www.sqatester.com/testersarea/joinus.htm
	
	---------------------------------------------------------------------
	To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
	For additional commands, e-mail: user-help@ant.apache.org
	
	



_____________________________________________________________
Join SQAtester.com Community  ---> http://www.sqatester.com/testersarea/joinus.htm

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


Mime
View raw message