You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Alexei Betin <AB...@futuretrade.com> on 2003/03/04 22:00:57 UTC
Emailing Build results
what are reasonable options for emailing nightly Build results?
MailLogger seems to have no way to attach the build log
or use properties in Subject,
also I am already using NoBannerLogger - which leaves no place
for MailLogger...
<mail> task cannot help me, because if I put it at the end
of my build script, and the build fails, it'll never get to
execute it.
Is there a way to ensure a task is always called at the end?
maybe using different build files with <ant> or <antcall>?
<parallel> would not help me here because it can only
wrap tasks and not targets...
Finally, I understand I can write my own Logger,
but for a couple of reasons I don't want to - I would
rather prefer to get the job done by some batch file,
but I wonder if I am missing a nice pure-Ant solution
Thanks,
~Alexei
Re: Emailing Build results
Posted by Sebastien Blanc <Se...@alcatel.com>.
> Is there a way to ensure a task is always called at the end?
ant-contrib try/catch/finally is one way
Re: Emailing Build results
Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
On Tuesday, March 4, 2003, at 04:00 PM, Alexei Betin wrote:
> what are reasonable options for emailing nightly Build results?
>
> MailLogger seems to have no way to attach the build log
> or use properties in Subject,
Actually you can use properties in the subject. You can define the
properties within your build file using:
<property name="..." value="..."/>
syntax and define them dynamically. The mandatory ones just need to be
set before the build completes.
> also I am already using NoBannerLogger - which leaves no place
> for MailLogger...
Well, here we get to the evilness of inheritance.
> Finally, I understand I can write my own Logger,
> but for a couple of reasons I don't want to - I would
> rather prefer to get the job done by some batch file,
> but I wonder if I am missing a nice pure-Ant solution
A couple of reasons, huh? It'd be trivial to write your own logger and
use it. Just copy MailLogger and do your own thing by mixing in what
NoBannerLogger does. Life would be so much easier if you just wrote a
simple class, compiled it, built it into a JAR and then dropped it into
ANT_HOME/lib and you could forget about it from then on out.
Erik