The AbstractMavenMojo's execute method declares it throws two exceptions, MojoExecutionException and MojoFailureException. Throwing either results in the build stopping and the log displays an almost identical message in each case.
The message for MojoExecutionException is:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] [exception text]
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
and the message for MojoFailureException is:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] [exception text]
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
When should you throw which exception and why?