ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Reading from and Writing to files in Ant
Date Mon, 14 Jun 2004 10:11:42 GMT
Often the configuration is done in xml files.
Then the xmltasks [1,2] would be very helpful.

Jan

[1] http://ant.apache.org/external.html#xmltask
[2] http://www.oopsconsultancy.com/software/xmltask.html


> -----Original Message-----
> From: Antoine Lévy-Lambert [mailto:antoine@antbuild.com]
> Sent: Saturday, June 12, 2004 12:22 AM
> To: Ant Users List
> Subject: Re: Reading from and Writing to files in Ant
> 
> 
> Hello Robert,
> 
> I do not know the specificities of your application.
> 
> You might want to have a look at a number of standard tasks 
> and types in 
> ant which might supply the kind of functionality you want.
> 
> I guess you have the relatively typical problem of adapting a few 
> settings in configuration files like the URL of a database or the
> location of a particular server, ...
> 
> You might want to use a template file, mark the spots in the template 
> files you want to replace by tokens like @DATABASEURL@,
> and use one or the other of the standard ant mechanisms like 
> copy with 
> filterset [1], the translate task, or the replacetokens filter [3].
> 
> If you really need scripting, the scriptdef task of ant 1.6 
> allows you 
> to write scripts in several languages supported by Apache bsf,
> and run  the fragment as a task in your buildfile.
> 
> Cheers,
> Antoine
> 
> [1] http://ant.apache.org/manual/CoreTypes/filterset.html
> [2] http://ant.apache.org/manual/OptionalTasks/translate.html
> [3] http://ant.apache.org/manual/CoreTypes/filterchain.html
> 
> 
> 
> Tand, Robert wrote:
> 
> >You'll have to pardon me, but I am very new to Ant...
> >
> >I've been scouring the web and have been unable to find an 
> answer to this:
> >
> >Is it possible for me to use scripting in Ant to modify 
> configuration files after install? I would like to be able to 
> supply a text file with configuration settings in the 
> installer that could be merged/added to existing files for 
> other applications.
> >
> >I've been looking into Ant scripting, and was wondering if 
> using something like Jython or Groovy might help me 
> accomplish this task.
> >
> >Any help would be appreciated...
> >
> >Rob
> >
> >---------------------------------------------------------------------
> >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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message