ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rizwan Merchant" <>
Subject RE: CVS failure notification..
Date Fri, 19 Aug 2005 15:40:24 GMT

Thanks Ivan, I will try that. will the same work for javac task? I noticed
there is no "output" or "error" attribute for the javac task. how would i
send a failure notification email if javac fails?

wouldnt it be simpler if ant had the functionality to set a property for
each task in case of failure? then we can just test the property and go
about doing what we want...

-----Original Message-----
From: Ivan Ivanov []
Sent: Friday, August 19, 2005 11:08 AM
To: Ant Users List
Subject: Re: CVS failure notification..


one way to do this is to use error and output
attributes of <cvs> task (quote from [1]):
output - the file to direct standard output from the
(cvs) command.
error - the file to direct standard error from the
(cvs) command

So you can store the error in a text file, than load
that file as a property and check whether it
<condition>[2] whether contains a given error message.

Here is the pseudo code:
<cvs command="checkout"
<loadfile property="cvs.error.msg"

<condition property="cvs.error">
  <contains string="${cvs.error.msg}"


The problem in this approach is that you should find
all possible cvs_error_msg_that_might_be_returned.

Well, you can also do the following: if the error file
is created, then obviously there is an error while
checking the module out. Instead of trying to find the
exact error, mail the whole error file :)


--- Rizwan Merchant <> wrote:

> Hi,
> I'm using ant to checkout code from the CVS. If the
> checkout is not
> successful I would like to send an email to someone
> to notify them of the
> problem.
> How do I detect this error in ant? Say the password
> on the cvs account is
> wrong, cvs notifies of bad login and then the ant
> continues executing with a
> "build successful" result (i.e. cvs exits normally).
> Any ideas? Pls help.
> Thanks,
> -Rizwan.
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around

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

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

View raw message