ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: Fail task
Date Fri, 16 Aug 2002 19:28:08 GMT
--- Dominique Devienne <DDevienne@lgc.com> 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:

    <fail unless="user_validated">
    ERROR: Invalid user running this script =&gt; ${user.name}
    The userid running this script must match the envirnoment variable,
    APPL_USER_ID =&gt; ${APPL_USER_ID}
    This environment variable is specified at the start of main in this
    script.
    </fail>
    <fail unless="rel_dir_validated">
    ERROR: Release already exists. Please remove directory: ${RELEASE_DIR}
    </fail>

(BTW: You might want to also consider changing that second <fail> to an
<echo> instead and using <input> to ask the user if they want to remove
${RELEASE_DIR}, and if they do, <delete> it for them and continue on,
rather than failing out, having them manually remove it, then running the
build again.)

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
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