ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Capturing Error with <exec> Command
Date Thu, 26 May 2005 16:04:11 GMT
You can use the resultproperty attribute to capture
the  return code of the process.  The <available> task
should help you determine whether the executable can
be found.

-Matt


--- Kapil Bajaj <kapilbajaj@in.ibm.com> wrote:
> Hi All
> 
> I am trying to execute Command using <exec> Tag in
> Ant 1.6
> 
> while executing command I am trying to redirect the
> output to text File. 
> Here I want if my exec Command Fails or Executable I
> am trying to execute 
> is not available then I should be able to Trap that
> event or Error Message 
> or set some property
> 
> <exec executable="db2licm"
> failifexecutionfails="false" 
> failonerror="false" output="db2-logs.txt"
> append="true">
>             <arg line="-l" />
> </exec>
> 
> Later Use that property to display some useful
> Information for User. 
> Please let me know if we can have workaround for
> this issue
> 
> 
> Thanks and Regards
>
------------------------------------------------------------------------------------------------------------------
> Kapil Bajaj
> India Software Labs
> IBM Software Group.
> Email : kapilbajaj@in.ibm.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message