ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: why no workie: adding attributes to Project
Date Wed, 17 Apr 2002 16:17:14 GMT
How about reading Ant's FAQ?!  :)

    http://jakarta.apache.org/ant/faq.html#mail-logger

A BuildListener is *exactly* how to do what you want.

As a matter of fact, Ant 1.5 includes a MailLogger (thank you very much :)
that does this very thing.

    Erik


----- Original Message -----
From: "stephan beal" <stephan@wanderinghorse.net>
To: "Ant Developers List" <ant-dev@jakarta.apache.org>
Sent: Wednesday, April 17, 2002 10:31 AM
Subject: Re: why no workie: adding attributes to Project


> On Wednesday 17 April 2002 15:33, Erik Hatcher wrote:
> > Well, your custom BuildListener/Logger could do anything you want,
really.
> > I've never seen it used to launch another target when a build failed,
and I
> > would suspect there would be some issues with doing this and would not
> > recommend it.
>
> The reason i wanna do that is to send my compile log via email even if the
> build fails. Right now i have to turn off failonerror for <javac> so my
email
> target gets run even if there are compile errors. i don't _really_ want to
do
> that, though, because then i cannot tell if the build really failed. If it
> does not fail, i'd like it to continue and copy the output files to our
test
> server. As it stands now i've got to monitor the build, make sure it
> succeeded, then start the upload manually. Not a big deal, just a minor
> annoyance.
>
> > Its certainly not quite the same as what you were getting at, but
try/catch
> > or the logger/listener approach is much better than tweaking with
Project,
> > which is a change you will have to maintain yourself forever and would
not
> > become part of the core Ant 1.x codebase.
>
> Just like my cvs cdata patch, so one more patch won't kill me. ;) True,
i'd
> rather avoid that, so....
>
> >From Peter Donald:
> > I would *highly* recomend using the TryCatch task as I have have
> > been using a version for a while now and it covers almost all my
> > error handling needs. I
> > haven't used the task at sourceforge but I vaguely recall Stefan
> > describing it and I thought it was better than what I was using :)
>
> That'll be my next stop, thanks :). i think that'll be more suitable for
some
> other things i'm currently kludging around, too.
>
> ----- stephan
> Generic Unix Computer Guy
> stephan@einsurance.de - http://www.einsurance.de
> Office: +49 (89)  552 92 862 Handy:  +49 (179) 211 97 67
> "As death comes, without our looking for it, so should be life."
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message