Class DefaultMessages

java.lang.Object
org.codehaus.plexus.build.messages.DefaultMessages
All Implemented Interfaces:
Messages

@Named("default") @Singleton public class DefaultMessages extends Object implements Messages
Default implementation of the Messages interface.

This implementation delegates to the BuildContext for compatibility with existing message handling infrastructure. It logs messages and calls the legacy BuildContext message API.

  • Constructor Details

    • DefaultMessages

      @Inject public DefaultMessages(BuildContext buildContext)
      Creates a new DefaultMessages instance.
      Parameters:
      buildContext - the BuildContext to which messages will be delegated
  • Method Details

    • clearAll

      public void clearAll()
      Description copied from interface: Messages
      Clears all messages. This removes all messages that were previously created through this API.
      Specified by:
      clearAll in interface Messages
    • clear

      public void clear(Path path)
      Description copied from interface: Messages
      Clears messages associated with a specific path.
      Specified by:
      clear in interface Messages
      Parameters:
      path - the file path for which to clear messages
    • error

      public MessageBuilder error(Path path)
      Description copied from interface: Messages
      Creates a builder for an error message.
      Specified by:
      error in interface Messages
      Parameters:
      path - the file path for which the error message should be created
      Returns:
      a MessageBuilder for constructing the error message
    • warning

      public MessageBuilder warning(Path path)
      Description copied from interface: Messages
      Creates a builder for a warning message.
      Specified by:
      warning in interface Messages
      Parameters:
      path - the file path for which the warning message should be created
      Returns:
      a MessageBuilder for constructing the warning message
    • info

      public MessageBuilder info(Path path)
      Description copied from interface: Messages
      Creates a builder for an informational message.
      Specified by:
      info in interface Messages
      Parameters:
      path - the file path for which the info message should be created
      Returns:
      a MessageBuilder for constructing the info message
    • build

      public MessageBuilder build(MessageType type, Path path)
      Description copied from interface: Messages
      Creates a builder for a message of a specific type. This is the generic method that the other build methods delegate to.
      Specified by:
      build in interface Messages
      Parameters:
      type - the type of message to build
      path - the file path for which the message should be created
      Returns:
      a MessageBuilder for constructing the message