ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perkins, Kristian" <Kristian.Perk...@ato.gov.au>
Subject RE: Creating a java file
Date Mon, 23 Feb 2004 23:42:49 GMT
I would be more inclined to write the date to a property file (with the
propertyfile task) rather than editing source code on the fly, then get
VersionDate or some other class to use that property at runtime.

Kristian


-----Original Message-----
From: Pritesh saharey [mailto:pritesh@sqatester.com] 
Sent: Tuesday, 24 February 2004 1:28 AM
To: Ant Users List
Subject: Re: Creating a java file


Ok thanx boss i was also thinking of this solution but thought lets see if
there is anyother soluition, let me try out if nay problem persiste i will
ping you back


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, I am
absolutely clear on what you want to do:

you want to generate a file with a given text string in it.
    i suggest you look at the echo task in the manual.
That file should contain the current date, formatted a certain way.
    i suggest you look at the tstamp task in the manual.

/t

Pritesh saharey wrote:

>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
>
>
>
>  
>

---------------------------------------------------------------------
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


****************************************************************
                            IMPORTANT

 The information transmitted is for the use of the intended recipient only and may contain
confidential and/or legally privileged material. Any review, re-transmission, disclosure dissemination
or other use of, or taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited and may result in severe penalties.
 If you have received this e-mail in error please notify the Privacy Hotline of the Australian
Taxation Office, telephone 13 28 69 and delete all copies of this transmission together with
any attachments. 
****************************************************************


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


Mime
View raw message