Print thread dump when halting build due to time out. This may ease troubleshooting the cause of the time out.
Allow executing additional action in timeout step before wrapped steps will be cancelled
With the timeout action available now, you can run a system groovy script to print a stack trace.
I can't find a system groovy script to print a stack trace, so I used the following shell script that relies on the knowledge that the timeout is caused by the unit test fired by maven surefire plugin.
pgrep -n -f surefire | xargs jstack