Monday, March 02, 2015

Using historical data to determine how long local maven builds take

As part of an exercise in putting together a business case for JRebel licences, a colleague asked me how long do my builds take on average. Well, because I have been using my own wrapper around maven (bash shell or Windows batch) to store the build logs, I was able to say exactly how long each particular build command had taken on average.

The longest builds, for example:

Average Time in Seconds Number of Runs Command
682.09 23 mvn -T1C -Plocal clean compile deploy
518.68 31 mvn -T1C -Plocal -DdisableDojoProdBuild -DdisableGWTBuild -DdisableJspCompile clean deploy

I generate my results from this Maven utility class I wrote:, available within the same git repo that the maven wrappers are within. All you need to do is adjust the path to the log directory and you can run it across your own build logs too!