When using exec:java to launch a Java program, the first exception that occurs in an AWT thread is squelched. Only the second and subsequent exceptions appear in the console. This does not happen if the same program is executed outside of the Maven environment.
A simple test case is attached to demonstrate this behavior. To run: "mvn install exec:java". You will see a window with a button. Clicking the button causes a java.lang.ArithmeticException to be thrown, but the exception does not appear in the console. Clicking the button again causes a second exception to be thrown. This time it does appear.
This behavior has been reproduced on Maven 2.2.1 and Maven 3.0-beta-1.
Run the same program outside of Maven with: "java -cp target/classes TraceTest". The exception will appear the first time you click the button. This is the expected behavior.
|Field||Original Value||New Value|
|Affects Version/s||1.2 [ 14962 ]|
|Status||Open [ 1 ]||Closed [ 6 ]|
|Assignee||Jerome Lacoste [ lacostej ]|
|Fix Version/s||1.2.1 [ 16633 ]|
|Resolution||Fixed [ 1 ]|