ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Moebius <>
Subject Re: <echo> multiline output
Date Mon, 03 Jun 2002 14:50:17 GMT
> Another strange thing -- your original <echo> task does result in an
> empty line in the middle in 1.5 if you include the -emacs
> flag:

Ok, I had a look a
If -emacs mode is off, a StringTokenizer is used to split the message
into lines. The tokenizer does not return delimiters, which is why 
  Some text${line.separator}

  Some more text.

does not get you an empty line. Likewise,

  Some text
  Some more text.

does not print the empty line, because the line contains only
"\n\r\n\r" which is skipped by the tokenizer. On the other hand


results in " \n\r\n\r" and the tokenizer returns the space (" ") and
you get the empty line.

In -emacs mode, the message passed to messageLogged() is simply output.

The XML parser does not influence the output of the empty line, the
only thing you need is the whitespace in that line, since most editors
remove lonely spaces at line ends, you need something to protect the
space that doesn't print. ${line.separator} or &#xa; do the job.

Probably a better solution would be to change DefaultLogger to also
print empty lines?


Stefan Moebius       <> 
  Wurzener Str. 43        +49 351 8475827
  01127 Dresden           +49 172 8739617

Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message