Jay Flowers wrote:
> On 7/6/06, Gary Feldman <[EMAIL PROTECTED]> wrote:
>
>> Is this really different from the <echo> task? The <echo> task can
>> append to an existing file, and your
>> <filterchain> example could be done just by embedded NAnt properties or
>> expressions. The only
>> possible difference I can see is that your filterchains let you use
>> CDATA and still do the substitutions; I
>> don't know whether NAnt will do that on CDATA values. Personally, I'd
>> rather use entities such
>> as < than CDATA.
>>
>
> Hmm, did you realy mean my filterchain? Filterchains are provided by
>
No, I meant your example of using filterchains.
> Core nAnt. If your question about the CDATA is does the write task's
> text datatype work with CDATA the answer is yes. I wrote it to work
>
No, the question is whether the echo task will handle the CDATA,
including processing the
NAnt expressions in ${}.
> with CDATA, that is why you see it being used in the example. The
> example is taken from a production script, believe me it works.
>
I wasn't questioning whether it worked.
> Luckily you are privileged to have your own opinions. Your question
> about are they really different, is that in relation to the out come
> or the useage. There is not difference in out come, they both write
> to a file. There is a great deal of difference in useage: CDATA and
> filterchains for starters. With the CDATA you can use multiline
> values. You can't do that with a property value attribute. You use
>
Yes, you can. I just tried it with:
<property name="prop1" value="val1
value2"/>
<echo file="foo.out">
This is an
embedded ${prop1}
multiline value
</echo>
and it works fine.
> filterchains and properties for different reasons. If you have need
> to use a filterchain then it is at your disposal. The write task's
>
However, as far as I can see, your example didn't show a case where
properties wouldn't work. I
was just trying to ask if you had a more compelling example.
> text datatype will expand properties as well, so if this suites your
> needs then use it. Echo is for I need to get a little message in a
> text file. Write is for I need to get all this text into a text file.
>
Perhaps the point of confusion is that multiline echo, such as
<echo file="filename" >
This is a very long
...
long set of text
</echo>
works fine, though I'll admit I was surprised when I first learned that,
many months ago.
Gary
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users