Class MojoFailureException

All Implemented Interfaces:
Serializable

public class MojoFailureException extends AbstractMojoExecutionException
An exception occurring during the execution of a plugin (such as a compilation failure).
Throwing this exception causes a "BUILD FAILURE" message to be displayed.
Author:
Brett Porter
See Also:
  • Constructor Details

    • MojoFailureException

      public MojoFailureException(Object source, String shortMessage, String longMessage)
      Construct a new MojoFailureException exception providing the source and a short and long message: these messages are used to improve the message written at the end of Maven build.
      Parameters:
      source -
      shortMessage -
      longMessage -
    • MojoFailureException

      public MojoFailureException(String message)
      Construct a new MojoFailureException exception providing a message.
      Parameters:
      message -
    • MojoFailureException

      public MojoFailureException(String message, Throwable cause)
      Construct a new MojoFailureException exception wrapping an underlying Throwable and providing a message.
      Parameters:
      message -
      cause -
      Since:
      2.0.9
    • MojoFailureException

      public MojoFailureException(Throwable cause)
      Constructs a new MojoFailureException exception wrapping an underlying Throwable.
      Parameters:
      cause - the cause which is saved for later retrieval by the Throwable.getCause() method. A null value is permitted, and indicates that the cause is nonexistent or unknown.
      Since:
      3.8.3