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
append
If the message should be appended to the toFile instead of opening a new file/overwrite an existing fileprivate java.io.File
basePath
The default path for fromFile and toFile.(package private) boolean
characterOutput
Debug flag that outputs the message as a character listprivate MavenEchoOutput
echoOutput
private EchoPlugin
echoPlugin
private java.lang.String
encoding
Encoding for the messages.private boolean
force
Overwrite read-only destination filesprivate java.lang.String
fromFile
If the message fetched from a file (or URL) instead of message tagprivate java.lang.String
level
Which output level the message should have.private java.lang.String
lineSeparator
Line separator messages.private MavenPluginLog
mavenLogger
private java.lang.String
message
The message text that should be echoedprivate boolean
skip
Set this to 'true' to bypass echo pluginprivate java.lang.String
toFile
If the message should be sent to a file instead of standard output
-
Constructor Summary
Constructors Constructor Description EchoMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
echo()
void
execute()
Execute plugin.private void
initLoggers()
(package private) void
setup()
-
-
-
Field Detail
-
message
@Parameter(property="echo.message") private java.lang.String message
The message text that should be echoed
-
fromFile
@Parameter(property="echo.fromFile") private java.lang.String fromFile
If the message fetched from a file (or URL) instead of message tag
-
basePath
@Parameter(defaultValue="${basedir}", readonly=true) private java.io.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 java.lang.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 java.lang.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 java.lang.String encoding
Encoding for the messages.
-
lineSeparator
@Parameter(property="echo.lineSeparator", defaultValue="${line.separator}") private java.lang.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
-
-
Method Detail
-
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
-
-