You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Sean Schofield <se...@gmail.com> on 2005/05/11 19:08:21 UTC
Anyone use email with Ant?
I'd like to incorporate an email to the myfaces-pmc list whenever the
nightly build fails. This will become increasingly important as we
rely on the nightly build to update the website. Forrest is picky
with the XML so if someone checks in malformed XML we won't be able to
build the new site and the MyFaces team should be notified.
If anyone has any experience with automated emails, logs, etc. from
Ant I would apprecitate the suggestions/code.
sean
Re: Anyone use email with Ant?
Posted by Sean Schofield <se...@gmail.com>.
That would probably work although I ended up using Martin's suggestion
of using the MailLogger that comes with Ant.
sean
On 5/16/05, Oliver Rossmueller <ol...@tuxerra.com> wrote:
> Sean,
>
> Wouldn't a simple shell script do the job:
>
> #! /bin/sh
>
> ant 2> /tmp/build.log > /tmp/build.log
>
> if grep FAILED /tmp/build.log > /dev/null 2> /dev/null; then
> cat /tmp/build.log | mail -s "Build failed" dev@myfaces.apache.org
> fi
>
> Oliver
>
>
> Sean Schofield wrote:
>
> >I'd like to incorporate an email to the myfaces-pmc list whenever the
> >nightly build fails. This will become increasingly important as we
> >rely on the nightly build to update the website. Forrest is picky
> >with the XML so if someone checks in malformed XML we won't be able to
> >build the new site and the MyFaces team should be notified.
> >
> >If anyone has any experience with automated emails, logs, etc. from
> >Ant I would apprecitate the suggestions/code.
> >
> >sean
> >
> >
>
> --
> Oliver Rossmueller
> Software Engineer and IT-Consultant
> Hamburg, Germany
> http://www.rossmueller.com
>
>
Re: Anyone use email with Ant?
Posted by Oliver Rossmueller <ol...@tuxerra.com>.
Sean,
Wouldn't a simple shell script do the job:
#! /bin/sh
ant 2> /tmp/build.log > /tmp/build.log
if grep FAILED /tmp/build.log > /dev/null 2> /dev/null; then
cat /tmp/build.log | mail -s "Build failed" dev@myfaces.apache.org
fi
Oliver
Sean Schofield wrote:
>I'd like to incorporate an email to the myfaces-pmc list whenever the
>nightly build fails. This will become increasingly important as we
>rely on the nightly build to update the website. Forrest is picky
>with the XML so if someone checks in malformed XML we won't be able to
>build the new site and the MyFaces team should be notified.
>
>If anyone has any experience with automated emails, logs, etc. from
>Ant I would apprecitate the suggestions/code.
>
>sean
>
>
--
Oliver Rossmueller
Software Engineer and IT-Consultant
Hamburg, Germany
http://www.rossmueller.com
Re: Anyone use email with Ant?
Posted by Martin Bosak <bo...@fmctc.com>.
Another option, instead of using a task in the build.xml script itself, is to use an Ant build listener. I just noticed that 1.6.3 has a listener called MailLogger. Look in the Ant Manual under Loggers & Listeners.
When I first started using Ant, they didn't have one to send E-mail; so I had to write my own which I'm still using; so I'm not familiar with the MailLogger and it's usage details.
The only thing, when starting Ant from the command line, you specify the listener to use with the -listener option.
Marty
----- Original Message -----
From: Matt Blum
To: MyFaces Development ; Sean Schofield
Sent: Wednesday, May 11, 2005 5:58 PM
Subject: Re: Anyone use email with Ant?
Ant has a mail task which is pretty robust, including allowing file attachments and such:
http://ant.apache.org/manual/CoreTasks/mail.html
I would suggest, however, using an automated build tool. I haven't used CruiseControl but I've heard mostly good things about it:
http://cruisecontrol.sourceforge.net/
I know CruiseControl has support for sending automated e-mails and creating HTML reports of builds.
-Matt
On 5/11/05, Sean Schofield <se...@gmail.com> wrote:
I'd like to incorporate an email to the myfaces-pmc list whenever the
nightly build fails. This will become increasingly important as we
rely on the nightly build to update the website. Forrest is picky
with the XML so if someone checks in malformed XML we won't be able to
build the new site and the MyFaces team should be notified.
If anyone has any experience with automated emails, logs, etc. from
Ant I would apprecitate the suggestions/code.
sean
Re: Anyone use email with Ant?
Posted by Matt Blum <mb...@gmail.com>.
Ant has a mail task which is pretty robust, including allowing file
attachments and such:
http://ant.apache.org/manual/CoreTasks/mail.html
I would suggest, however, using an automated build tool. I haven't used
CruiseControl but I've heard mostly good things about it:
http://cruisecontrol.sourceforge.net/
I know CruiseControl has support for sending automated e-mails and creating
HTML reports of builds.
-Matt
On 5/11/05, Sean Schofield <se...@gmail.com> wrote:
>
> I'd like to incorporate an email to the myfaces-pmc list whenever the
> nightly build fails. This will become increasingly important as we
> rely on the nightly build to update the website. Forrest is picky
> with the XML so if someone checks in malformed XML we won't be able to
> build the new site and the MyFaces team should be notified.
>
> If anyone has any experience with automated emails, logs, etc. from
> Ant I would apprecitate the suggestions/code.
>
> sean
>