On Thu, Jun 18, 2009 at 6:35 PM, Michael Ludwig<[email protected]> wrote: > From googling, I know that Ant cannot display a progress bar on the console. > [snip] > C:\ :: \dev\Perl\progressbar.pl > 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: [email protected] For additional commands, e-mail: [email protected]
