really ? even if the replace token is somthing like <%nantpath%> ? - ( using asp's format )

echo to file might be useful though
Ian

Kr�n Munck wrote:

Wouldn't an "echo to file" task be more appropriate for that job? It's a
small file with known content, so nothing should go wrong - but
something in my spine twitches when I think of global replace.

Kr�n

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian
MacLean
Sent: 6. oktober 2003 04:26
To: Mitch Denny
Cc: Gert Driesen; [EMAIL PROTECTED]
Subject: Re: [nant-dev] [Fwd: Ready to tackle next release]


+1, mainly because I've just found a use for it in our linux build. We
need to create a nant shell script that contains the full path to the just built NAnt.exe which we won't know till we build it. So it would be


a prime candidate for a use of the replace task.

Ian



The <touch /> task could possibly be modified to do it. But replace would possibly be more intuitive for new users than using a filter chain. It could probably support filter chains anyway - it might also be cool to have a generic <filter /> task too. Next release :)

I'm thinking that we could put the replace task in now since it would be useful, and then modify its implementation when chaining support is added.

What do you all think?

----------------------------------------
- Mitch Denny
- [EMAIL PROTECTED]
- http://www.monash.net
- +61 (414) 610141
-





-----Original Message-----
From: Ian MacLean [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 2:03 AM
To: Gert Driesen
Cc: Mitch Denny; [EMAIL PROTECTED]
Subject: Re: [nant-dev] [Fwd: Ready to tackle next release]

I just noticed that Ant still has both the replaceTask and
the filtersets in copy/zip etc. I'm sure you could accomplish an in-place replace with filtersets but I can see a task called replace being easier for new uesrs to deal with than filterchains.


Ian

http://ant.apache.org/manual/CoreTasks/replace.html

Gert Driesen wrote:





to be honest, I'm not sure about that one ... If necessary we could
ofcourse create a task for that, but I was just saying we don't necessary need one ... didn't really give it much thought yet ...


Gert

----- Original Message -----
From: "Ian MacLean" <[EMAIL PROTECTED]>
To: "Gert Driesen" <[EMAIL PROTECTED]>
Cc: "Mitch Denny" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Sunday, October 05, 2003 1:53 PM
Subject: Re: [nant-dev] [Fwd: Ready to tackle next release]








What if you want to replace strings in a file in place ? -




ie without




copying/moving the file

Ian
Gert Driesen wrote:







something like that yes :-)

but instead of having a separate task for that purpose, filterchain






support






would be added to existing tasks (like copy, zip, ...)

Gert

----- Original Message -----
From: "Mitch Denny" <[EMAIL PROTECTED]>
To: "Gert Driesen" <[EMAIL PROTECTED]>; "Ian MacLean" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, October 05, 2003 12:15 PM
Subject: RE: [nant-dev] [Fwd: Ready to tackle next release]



So in implementation it would work like this:


[FilterChain("filterchain")]
public FilterChain FilterChain {
...
}

Then in the execute task:

StreamReader reader = new StreamReader(...); StreamWriter writer =
new StreamWriter(...); this.FilterChain.Filter(reader, writer);

Or something like that.

----------------------------------------
- Mitch Denny
- [EMAIL PROTECTED]
- http://www.monash.net
- +61 (414) 610141
-

















------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers







------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to