[vc_row][vc_column][vc_column_text]
For some months we have been having problems with maven-surefire-plugin showing very strange exception stack traces.
After some searching, I found out that maven-surefire-plugin has a trimStackTrace configuration option which is set to true by default. See http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#trimStackTrace
I have no idea who thought that removing part of the stack trace would be a good idea, but it’s caused us no end of problems. Especially with rare/random test failures as we don’t get the full stack trace to see what really failed.
To change this ‘feature’ you simply define surefire configuration in your pom.xml. E.g.
[/vc_column_text][vc_column_text]
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${maven-surefire-plugin.version}</version> <configuration> <trimStackTrace>false</trimStackTrace> </configuration> </plugin>
[/vc_column_text][us_separator][vc_column_text]
You should also be aware that maven-failsafe-plugin has the exact same option. The trimStackTrace is also set to true by default. See https://maven.apache.org/surefire/maven-failsafe-plugin/integration-test-mojo.html
You can disable this by adding the same configuration to the failsafe plugin. E.g.
[/vc_column_text][vc_column_text]
<configuration> <trimStackTrace>false</trimStackTrace> </configuration>
[/vc_column_text][/vc_column][/vc_row]