Monday, January 26, 2009

Helpful Maven Build Tips

Brian Fox recently posted some great tips to improve your Maven builds. You should check them out if you haven't already. I've been doing most of what he said already but one really caught my attention, and I will repost here:

#6 Print Test Failures to Standard Output

Tip: Enable -Dsurefire.useFile=false. This is a favorite of mine since this causes surefire to print test failures to standard out, where it will get included in the build failure log and email. This saves you from having to dig back onto the machine to find the surefire report just to see a simple stack trace. (to enable globally in settings.xml:true in an active profile)


I can't believe I didn't know about this option before. Having to grep through surefire log files has really annoyed me in the past... many kudos to Brian for sharing this!

No comments: