ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Burton" <>
Subject Re: Problems with BuildListener
Date Wed, 28 Feb 2001 21:43:07 GMT

I looked into this recently in the 1.3beta codebase and found the
BuildFinish event is fired before the log is closed.  The BuildFinished
event is fired in the runBuild method of but the logging is set
in Main's constructor.  On Windows NT/2K this would likely prevent
anything that tries to do something with the log in a BuildFinished event
from working because the log is still open.

Closing the log before firing the BuildFinished event is not an option
because some listeners may depend on writing to the log.  Providing a way
for for a BuildListener to close the log could cause problems if there's
more than one listener.  Maybe a new event needs to be added such as
LogClosed which would be fired after the log is closed.


na na wrote:
> Hi,
>     I'm trying to write a BuildListener based on Will Glozer's BuildMonitor
> which send a mail with the build results. My
> problem is that the build log seems to be incomplete when
> my listener receives the buildFinished. I'm guessing that
> my BuildListener receives the buildFinished event before
> the DefaultLogger and therefore the DefaultLogger hasn't
> flushed/closed the log file, which is why it's imcomplete.
> Is this correct? Anyway around this problem?
> Thanks for your help,
> Chuck

View raw message