ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <zod...@holoweb.net>
Subject Re: Fail task
Date Fri, 16 Aug 2002 19:30:12 GMT
Weird; so 

  message='\n'

 renders as a newline but

  message='
'

doesn't?

L.

On 8/16/02 10:02 AM, "Buonassisi, Vincent" <vbuona01@sprintspectrum.com>
wrote:

> Well, I do it as follow:
> 
> 
>   <target name="validate_rel_dir">
>       <available property="rel_dir_validated" file="${RELEASE_DIR}"
> type="dir"/>
>   </target>
> 
>   <target name="validate_user">
>       <condition property="user_validated">
>           <equals arg1="${APPL_USER_ID}" arg2="${user.name}"/>
>       </condition>
>   </target>
> 
>   <target name="validate" depends="validate_user, validate_rel_dir">
>       <fail unless="user_validated" message="\tERROR: Invalid user running
> this script => ${user.name}\n\t       The userid running this script must
> match the envirnoment variable, APPL_USER_ID => ${APPL_USER_ID}\n\t
> This environment variable is specified at the start of main in this
> script"/>
>       <fail unless="rel_dir_validated" message="\tERROR: Release already
> exists, please remove directory first:   ${RELEASE_DIR}"/>
>   </target>
> 
> If I did it the way you suggest then I would have to create a couple of more
> tasks.  Which I could do.
> 
> Btw, instead of a series of <echo>s you could have:
> 
> <echo>
> line1
> line2
> line3
> </echo>
> <fail> .... </fail>
> 
> thanks for your suggestion,
> 
> 
> -----Original Message-----
> From: Geoff Meakin [mailto:geoffm@isocra.com]
> Sent: Friday, August 16, 2002 8:40 AM
> To: Ant Users List
> Subject: RE: Fail task
> 
> 
> Sorry if Im being stupid- is there any reason why you cant
> use many <echo>s followed by a final <fail>.
> That's what I do
> 
> But I believe there's also a newline character in the HTML entities
> spec which you can probably use.
> 
> Cheers
> -Geoff
> 
> 
> 
> 
> 
> Hi,
> 
> It would be nice if the task <fail> allowed the <echo> task as a nested
> task.  But, since i can't have this how would i get a multiline message
> displayed using the <fail> task?  is it possible to embed newlines (\n| and
> tabs (\t) in the message?
> 
> thanks,
> 
> vince
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 


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