(See attached file: patch.jar)
Here's a patch that cleans up some of the output generated by Ant. I've
made the following changes:
* Moved the rest of the "System.out.println" code in Main.java over to
DefaultLogger.java.
* Cleaned up the default output to be a little more readable, by
putting blank lines between targets and aligning the message part of each
log statement.
* Added a System.exit() call in main() to avoid dumping a stack trace
for every single error. Other tools that want to invoke Ant without exiting
can still call new Main(args).runBuild().
* Changed the Javac task back to logging each line as it's generated.
I've created a generic TaskOutputStream to replace JavacOutputStream, which
is designed to be usable in any task.
Here's how the new output looks when building ant itself. Let me know if
you think it's an improvement or not...
D:\jakarta-ant>build clean main
Buildfile: build.xml
clean:
[Deltree] Deleting: D:\build\ant
[Deltree] Deleting: D:\dist\ant
prepare:
[Mkdir] Created dir: D:\build\ant
check_for_optional_packages:
compile:
[Mkdir] Created dir: D:\build\ant\classes
[Javac] Compiling 65 source files to D:\build\ant\classes
[Copydir] Copying 2 files to D:\build\ant\classes
[Copydir] Copying 1 files to D:\build\ant\classes
jar:
[Jar] Building jar: D:\jakarta-ant\lib\ant.jar
main:
BUILD SUCCESSFUL
Total time: 18 seconds
patch.jar
Description: Binary data
