Package echo

Class EchoMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
echo.EchoMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="echo", threadSafe=true, defaultPhase=INITIALIZE, requiresProject=false) class EchoMojo extends org.apache.maven.plugin.AbstractMojo
Mojo (Maven plugin) that outputs messages during Maven build.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
    If the message should be appended to the toFile instead of opening a new file/overwrite an existing file
    private File
    The default path for fromFile and toFile.
    (package private) boolean
    Debug flag that outputs the message as a character list
     
    private EchoPlugin
     
    private String
    Encoding for the messages.
    private boolean
    Overwrite read-only destination files
    private String
    If the message fetched from a file (or URL) instead of message tag
    private String
    Which output level the message should have.
    private String
    Line separator messages.
     
    private String
    The message text that should be echoed
    private boolean
    Set this to 'true' to bypass echo plugin
    private String
    If the message should be sent to a file instead of standard output

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
     
    void
    Execute plugin.
    private void
     
    (package private) void
     

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • message

      @Parameter(property="echo.message") private String message
      The message text that should be echoed
    • fromFile

      @Parameter(property="echo.fromFile") private String fromFile
      If the message fetched from a file (or URL) instead of message tag
    • basePath

      @Parameter(defaultValue="${basedir}", readonly=true) private File basePath
      The default path for fromFile and toFile. The fromFile will be read relative to this path. The toFile will be created relative to this path. READ-ONLY
    • toFile

      @Parameter(property="echo.toFile") private String toFile
      If the message should be sent to a file instead of standard output
    • append

      @Parameter(property="echo.append", defaultValue="false") private boolean append
      If the message should be appended to the toFile instead of opening a new file/overwrite an existing file
    • force

      @Parameter(property="echo.force", defaultValue="false") private boolean force
      Overwrite read-only destination files
    • level

      @Parameter(property="echo.level", defaultValue="INFO") private String level
      Which output level the message should have. The following values are available 'FAIL', 'ERROR', 'WARNING', 'INFO', and 'DEBUG'
    • encoding

      @Parameter(property="echo.encoding", defaultValue="UTF-8") private String encoding
      Encoding for the messages.
    • lineSeparator

      @Parameter(property="echo.lineSeparator", defaultValue="${line.separator}") private String lineSeparator
      Line separator messages. Can be either \n, \r or \r\n
    • characterOutput

      @Parameter(property="echo.characterOutput", defaultValue="false") boolean characterOutput
      Debug flag that outputs the message as a character list
    • skip

      @Parameter(property="echo.skip", defaultValue="false") private boolean skip
      Set this to 'true' to bypass echo plugin
    • mavenLogger

      private MavenPluginLog mavenLogger
    • echoOutput

      private MavenEchoOutput echoOutput
    • echoPlugin

      private EchoPlugin echoPlugin
  • Constructor Details

    • EchoMojo

      EchoMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoFailureException
      Execute plugin.
      Throws:
      org.apache.maven.plugin.MojoFailureException - exception that will be handled by plugin framework
      See Also:
      • Mojo.execute()
    • initLoggers

      private void initLoggers()
    • setup

      void setup() throws org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoFailureException
    • echo

      void echo() throws org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoFailureException