ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: Sending Mail from Ant on Windows
Date Thu, 06 Sep 2001 04:05:21 GMT
How about a feature that that is not really a "task", but some global
definition that gets read and added to the listener list at parse time so
that it could receive all the messages?   (actually looking at it
would miss the "build started" message at least)

If only the "build started" message is missed, that is probably an
acceptable documented caveat to listeners added from build.xml.

Would anyone object to such a feature being added to Ant?   I know in our
environment that I don't have as much control over the surrounding script
where Ant runs on our nightly builds, so getting a command-line changed is
not the easiest thing to do, but I do have control entirely over build.xml
and if the build mailer listener could be attached via build.xml internally
then life would be easier!

If there are no objections, I'll get the FAQ sample code for the mailer
listener touched up and submitted for inclusion in the Ant core, as well as
an enhancement to the build.xml parsing so that a <listener> tag can be used
to attach a listener.

What would also be really nice is a way to set some initialization
properties on a listener externally, although I it could freely get at
project properties if desired, but I was thinking something along the lines

    <listener class="">
        <param name="" value=""/>
        <param name="" value=""/>

But changing the BuildListener interface would not make folks happy.

What are folks thoughts on how to implement passing parameters to a listener
but retain backwards compatibility?   Having the listener just pull project
properties internally seems like a reasonable way, I suppose.


----- Original Message -----
From: "Conor MacNeill" <>
To: <>
Sent: Wednesday, September 05, 2001 5:12 PM
Subject: RE: Sending Mail from Ant on Windows

> > From: Erik Hatcher []
> >
> > Can a build listener be attached by specifying something in build.xml as
> > well so that command-line tweaking isn't needed at all?
> >
> A task can attach a listener. Check the sound task - I think it adds a
> listener. There is no <listener> task, though. Such a listener will not
> receive all of the events that a listener added from the command line
> Conor

View raw message