Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
creating files

creating files

2007-06-11       - By arijit
Reply:     1     2     3     4     5     6     7     8     9     10     >>  


i tried out  "<replace file="abc.bat" token="VARIABLE" value="version"/>"

it worked perfectly replacing VARIABLE with version. But my next task is to
read the value from some property file instead of typing in the value as
shown above.

i will also try out Gilbert's suggestion to load the property value and
retrieve using key-value pair.


arijit wrote:
>
> that's good...  lets say the batch file I am creating has an entry "echo
> java -VARIABLE"...  now when the actual batch file is created, VARIABLE
> has to be replaced by either version or maybe help or something else..
>
> can I use the replace task to replace sections of the batch files ? I will
> try out the replace task...
>
>
> Jukka Uusisalo-2 wrote:
>>
>>> -----Original Message-----
>>> From: arijit [mailto:ghosh.arijit@(protected)]
>>> Sent: 11. kesakuuta 2007 13:01
>>> To: user@(protected)
>>> Subject: RE: creating files
>>>
>>>
>>>
>>> great.. I can now create batch files using <echo file.... >
>>> and also use
>>> <echo message.... file.... > to add contents to the file.
>>>
>>> is it possible to read data from some property file and then use it to
>>> generate the batch file ? In other words, batch file
>>> generated will have
>>> some information which is read from the property file and
>>> added to the batch
>>> file at runtime.
>>>
>>>
>>
>> How about replace task? First generete batch file as template, then read
>> properties and replace them to batch file.
>>
>> - Jukka -
>>  
>>>
>>> Rebhan, Gilbert wrote:
>>> >
>>> >  
>>> > Hi,
>>> >
>>> >
>>> > -----Original Message-----
>>> > From: arijit [mailto:ghosh.arijit@(protected)]
>>> > Sent: Monday, June 11, 2007 10:58 AM
>>> > To: user@(protected)
>>> > Subject: creating files
>>> >
>>> >
>>> > /*
>>> > Using ANT, I want to generate some batch and property files. Is it
>>> > possible
>>> > to create new files ?
>>> > */
>>> >
>>> > if you speak of ascii files you go via <echo file="foobar.txt> or
>>> > <echoxml>
>>> > which is new for ant 1.7.0
>>> >
>>> > there are also some preprocessing task, which might be helpful when
>>> > creating files, simply google for ant+preprocessing
>>> >
>>> >
>>> > otherwise you can use <exec>
>>> >
>>> >
>>> > Regards, Gilbert
>>> >
>>> >
>>> ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> > For additional commands, e-mail: user-help@(protected)
>>> >
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>> http://www.nabble.com/creating-files-tf3900318.html#a11057910
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
>

--
View this message in context: http://www.nabble.com/creating-files-tf3900318
.html#a11058257
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.