ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@ebinteractive.com.au>
Subject RE: [PATCH] Wait and Available (Updated)
Date Tue, 09 Jan 2001 03:38:30 GMT
Duncan,

> Yes. System.out as used by tasks has to go away. Instead they should be
> sending message events that have Task/Target identification so that the
> output tool can sort the output appropriately. A convenience .message()
> method can be provided on the Abstract Task implementation that wraps a
> given message as an Event so that task writers don't have to worry about
> building Event objects everywhere.
>

Unfortunately the <java> task can execute arbitrary java classes that can
write to System.out. The <java> task contains two other facilities which
complicate matters. The class can be run in the ant VM  (fork="no") and it
can redirect its output to a file. With those two combinations, the task
will effectively redirect the Ant VM's System.out to the file. That won't
work in a multithreaded model. In that case, we may need to allow a task to
know if it is being run in a thread. The java task could then do something
like

if (threaded && redirecting && not forked) {
   throw new BuildException("Choose any two, baby");
}

Conor





Mime
View raw message