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)
      Constructs a new MojoException 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)
      Constructs a new MojoException wrapping an underlying Throwable and providing a message.
    • MojoException

      public MojoException(String message)
      Constructs a new MojoException providing a message.
    • MojoException

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