I'll just add that this technique does not work with <echo> when appending
to a file, because it doesn't append the right type of line terminator. Had
to resort to the ugly thing below:
<echo file="${mowi-cvs-manifest}"
message="===================${nl}"
append="yes" />
<echo file="${mowi-cvs-manifest}"
message="Build Machine: ${env.COMPUTERNAME}${nl}"
append="yes" />
<echo file="${mowi-cvs-manifest}"
message="Base Directory: ${basedir}${nl}"
append="yes" />
<echo file="${mowi-cvs-manifest}"
message="Start time: ${TIME_NOW} on ${TODAY}${nl}"
append="yes" />
<echo file="${mowi-cvs-manifest}"
message="Java VM Version: ${java.vm.version}${nl}"
append="yes" />
instead of the way nicer:
<echo file="${mowi-cvs-manifest}"
append="yes">
===================
Build Machine: ${env.COMPUTERNAME}
Base Directory: ${basedir}
Start time: ${TIME_NOW} on ${TODAY}
Java VM Version: ${java.vm.version}
</echo>
because opening the generated (on Windows) file with Notepad, I get the
dreaded little squares, and the formatting is awful. The ugly technique
presented first was the only way to have it display correctly.
Not directly linked to <fail>, but related to the same issue (output of the
tag's content). --DD
PS: And no, the build.xml doesn't have Unix line terminator, but Windows
ones.
-----Original Message-----
From: Diane Holt [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 2:28 PM
To: Ant Users List
Subject: RE: Fail task
--- Dominique Devienne <[EMAIL PROTECTED]> wrote:
> Better yet, use the platform independent one, i.e. ${line.separator}
> (that I personally usually alias to something shorter, like ${nl}.
Or you could just nest your message under <fail>, instead of trying to
stick it all in the 'message' attribute:
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>