ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject Re: Progessbar on the console?
Date Fri, 19 Jun 2009 04:19:28 GMT
On Thu, Jun 18, 2009 at 8:22 PM, Michael Ludwig<> wrote:
> Dominique Devienne schrieb am 18.06.2009 um 19:42:12 (-0500):
>> As you may have read, Ant redirects java.System.out to intercept all
>> println calls to send them to a Logger and zero or more listeners. But
>> it also does line buffering on this stream, which prevents Junit-like
>> dot-dot-dot output to the console.
> Yes, that would have to change, I guess. Difficult?

Well, if it's not line-buffered, what does it do, send every character
Look at DemuxOutputStream. Looks like explicit calls to flush will actually
flush the buffer to the logger+listeners, so maybe there's nothing to do.

>> You have very little control (to not say not at all) over the tty in
>> Java to do something like what you describe in a portable manner, but
>> I could be wrong.
> Ah, so not only Ant makes it complicated, but also Java. Google found me
> something:

This just shows that I'm no longer actively writing Java code...
This is a class new to 1.6 that I've never used.

> Haven't looked more closely, but progress bars don't seem impossible in
> Java. So only Ant would have to accomodate this.

I guess that line-buffered or not is not really the issue here. If you
try to replicate
exactly what the Perl code does, you need to rewrite the same tty line over and
over, which might allow easily, provided you chop the
trailing \n
before writing it on screen, unless Console provides even more control over the

>> As you can see, my knowledge of the topic is quite limited, but
>> hopefully this might help a little nonetheless. --DD
> Less limited than mine - good input, thanks!

Not for long it seems, and I learned about Console that way :) --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message