This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When Ant output verbosity is set to "Quiet", exceptions are not shown during "run" or "test". This is not consistent: setting Ant's verbosity to "Quiet" makes Ant display only warnings and errors (or more general: everything that goes to System.err). Exceptions ARE errors. They should be displayed even if verbosity is "Quiet".
Sorry, the RFE applies only to execution of JUnit tests. Consider the following code: = = = = = = = = = = CODE = = = = = = = = = = import org.junit.*; public final class _NBRunWithException { // doing "run" does display this exception public static void main(String... args) { throw new Error("Dear Ant, please display this, even when verbosity is 'Quiet'"); } // doing "test" does NOT display this exception @Test public void test() { throw new Error("Dear Ant, please display this, even when verbosity is 'Quiet'"); } }
Created attachment 103206 [details] JUnit test case output, ant verbosity is NORMAL, exception is VISIBLE
Created attachment 103207 [details] JUnit test case output, ant verbosity is QUIET, exception is INVISIBLE
This is just what Ant itself does, easily reproducible by passing -q on the command line. The Test Results window shows the full stack trace. I do not recommend setting verbosity to Quiet. It is more there for completeness with other settings such as Verbose and Debug useful on occasion for debugging complex builds.
By setting Ant to "Quiet" I just wanted to get rid of too verbose output during actions such as clean+build, which for 90% consists of: init: deps-clean: "Created dir" [...] "Updating property file" [...] SomeProject.init: SomeProject.deps-clean: "Updating property file" [...] "Deleting directory" [...] SomeProject.clean: [...] (Even worse, when you have many dependent projects) Any ideas, how this can be reduced (workaround and/or another RFE)? Thank you!
If you're just interested in running unit tests with Compile on Save checked, you do not need Clean & Build. Otherwise, there is no recommended way of reducing verbosity for regular builds. (More targets could have been prefixed with '-' in nbproject/build-impl.xml but it is too late to make such changes without endangering compatibility for existing projects with overrides in build.xml.)
Understand... Could an option be added to Options/Misc/Ant/... which would reduce only Netbeans-originating output? Wouldn't break any compatibility.
Why I am interested in reducing clean+build output: I do clean+build a lot because of generative code (either custom, or produced during annotation-processing).
"Updating property file" and "Deleting directory" are emitted by Ant. deps-clean etc. are target names, which as previously mentioned probably cannot be changed now. It would be possible to write an AntLogger impl in a plugin which would hide some of this output for the case of Java SE projects, but I do not plan to do it.