Control the Build Script Output
By Geertjan-Oracle on Jan 23, 2008
Firstly, it's worth pointing out that you don't see ALL the Ant output. That's because ALL the Ant output includes the output produced by Ant targets that have names that start with a hyphen, although the Output window (as shown above) excludes all these targets. These are targets that can only be called by other targets, and not independently. In fact, if you were to see ALL the Ant output, the Output window above would have this content:
-pre-init -init-private -init-user -init-project -init-macrodef-property -do-init -post-init -init-check -init-macrodef-javac -init-macrodef-junit -init-macrodef-nbjpda -init-debug-args -init-macrodef-debug -init-macrodef-java -init-presetdef-jar init: deps-jar: -pre-pre-compile Created dir: /home/geertjan/NetBeansProjects/JavaApplication5/build/classes -pre-compile -compile-depend -do-compile Compiling 1 source file to /home/geertjan/NetBeansProjects/JavaApplication5/build/classes -post-compile compile: -pre-jar -pre-pre-jar Created dir: /home/geertjan/NetBeansProjects/JavaApplication5/dist -do-jar-with-manifest -do-jar-without-manifest -do-jar-with-mainclass -do-jar-with-libraries Building jar: /home/geertjan/NetBeansProjects/JavaApplication5/dist/JavaApplication5.jar Not copying the libraries. To run this application from the command line without Ant, try: java -jar "/home/geertjan/NetBeansProjects/JavaApplication5/dist/JavaApplication5.jar" -post-jar jar: BUILD SUCCESSFUL (total time: 0 seconds)
Secondly, to exclude EVERYTHING (i.e., ALL the targets), the org.apache.tools.ant.module.run.StandardLogger class would need to be rewritten to change this (possibly with an option in the Options window to toggle Ant output being printed/not printed).
Thirdly, however, today I came across an e-mail by Tom Wheeler to the email@example.com mailing list, where he points to this FAQ that he recently wrote:
I tried that exact same approach, to mask out the org.apache.tools.ant.module.run.StandardLogger. Guess what? It worked. In META-INF/Services, I have a file called org.apache.tools.ant.module.spi.AntLogger. It contains exactly this content:
Now, the standard logger will not be used. Instead, I have my own new logger, in a module called org.netbeans.supersilentmode which now provides the output, which could possibly simply be a happy little tune (or a sad one, for failed builds), as shown yesterday.