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 00:42:12 GMT
On Thu, Jun 18, 2009 at 6:35 PM, Michael Ludwig<> wrote:
> From googling, I know that Ant cannot display a progress bar on the console.
> [snip]
> C:\ :: \dev\Perl\
> 76% [================================================                ]
> [snip]
> Would that be very complicated to do in Ant?

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.

There are existing contributed Loggers which for example take advantage of
some *nix terminal codes to color the output, and provided you have a terminal
that properly handles some BACKSPACE code, you could imagine a Logger
that prints out a bunch of backspaces to erase the current line to print the
new updated one. 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.

As you can see, my knowledge of the topic is quite limited, but hopefully
this might help a little nonetheless. --DD

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

View raw message