I have a long build with numerous steps, plugins and executions configured in roughly 30 poms belonging to a complex modularized project. As the build is taking too much (2h) I’d like to streamline it a bit, for which I’d like maven to list me all the steps it would go through without executing it. Something like:
$ mvn --dry-run clean
[INFO] Reactor Build Order:
[INFO]
[INFO] Main project
[INFO] Module#1
[INFO] Module#2
[..]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Main Project
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ main ---
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Module#1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ module1 ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0:01.020s
[INFO] Finished at: Thu Apr 26 09:56:14 CEST 2012
[INFO] Final Memory: 198M/379M
[INFO] ------------------------------------------------------------------------
Is there any way to have such information without me digging in a couple of megs of a log file?
As there’s apparently no OOTB way to do it, I ended up writing the plan-maven-plugin. It allows you to unroll the plan providing the
goalsparameter:or to execute it as part of the normal build:
Sample output: