Class MojoException

All Implemented Interfaces:
Serializable

@Experimental public class MojoException extends MavenException
An exception occurring during the execution of a plugin.
Since:
4.0.0
See Also:
  • Field Details

    • source

      protected Object source
    • longMessage

      protected String longMessage
  • Constructor Details

    • MojoException

      public MojoException(Object source, String shortMessage, String longMessage)
      Construct a new MojoException 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.
    • MojoException

      public MojoException(String message, Throwable cause)
      Construct a new MojoExecutionException exception wrapping an underlying Throwable and providing a message.
    • MojoException

      public MojoException(String message)
      Construct a new MojoExecutionException exception providing a message.
    • MojoException

      public MojoException(Throwable cause)
      Constructs a new MojoExecutionException 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.
  • Method Details

    • getLongMessage

      public String getLongMessage()
    • getSource

      public Object getSource()