ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Niven <John.Ni...@marcat.com>
Subject RE: new line in echo
Date Mon, 29 Apr 2002 16:51:25 GMT
> -----Original Message-----
> From: Dominique Devienne [mailto:DDevienne@lgc.com] 
> Sent: 29 April 2002 17:43
> To: 'Ant Users List'
> Subject: RE: new line in echo
> 
> Faced the same problem I think. I could only come up with this:
> 
> <property name="nl" value="${line.separator}" />
> <echo file="${logfile}"
>       message="blabla${nl}"
> 	append="yes" />
> <echo file="${logfile}"
>       message="more blabla${nl}"
> 	append="yes" />
> 
> I think I remember trying:
> 
> <echo file="${logfile}"	append="yes" />
> Blabla
> more blabla
> </echo>
> 
> and that it didn't work correctly...

This worked for me.  Only problem with it is when I run Ant thru'
antRunner/Jbuilder, and my beautifully formatted tables are displayed in a
variable-width font :(  I did think that this was the "recommended" Ant way
of echo-ing mulit-line text, but re-reading the docs they don't specify
multiple *display* lines, just text that spans multiple lines of the build
file.

> ... I'm not sure I tried:
> 
> <echo file="${logfile}"	append="yes" />
> Blabla${nl}
> more blabla${nl}
> </echo>
> 
> It may have had my newline with still the extra incorrect 
> newline for my platform (W2K). I would have expected <echo> 
> to replace the Text with proper line termination for the 
> current platform (or a target os), but it didn't or I 
> couldn't figure out how for sure. Bug???
> 
> --DD

I'll play around tonight, and see what I get.

Cheers
John

 --
John Niven
Please reply through mailing list

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


Mime
View raw message