I am trying to run JUnit tests through a silent eclipse in our build process. Unit tests are called from an Ant script using this command:
eclipsec.exe -noSplash -application org.eclipse.ant.core.antRunner -data "C:\SomeDirectory" -buildfile "C:\Path\To\tests.xml"
This works fine unless the Ant script fails for some reason (either using an explicit task because the unit test fails, or because the unit test throws an upstream exception). In any case, eclipsec creates a dialog box for reporting that "an error has occurred." This is followed by an exception. The top of the stack trace, if it matters, is:
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:513) at org.eclipse.ant.core.AntRunner.start(AntRunner.java:600)
I don’t care why Ant script or eclipse doesn’t work, for which purpose a log is kept, but the dialog box that appears with it is unacceptable because it hangs by our continuous system integration while it waits for an invisible user to click on him.
Can this dialog be disabled? Is there any way around this dialog box, which does not require a real user to respond to it?
Additional Information: Eclipse Version: Indigo (last as of yesterday). Ant and JUnit, internal to him. Java version: JDK 6.0_30 32bit OS: Windows (7 and Server 2003)
source share