public interface Mojo
Mojosto interact with the
execute()method, which triggers the Mojo's build-process behavior, and can throw a MojoExecutionException or MojoFailureException if error conditions occur.
setLog(...)method, which simply allows Maven to inject a logging mechanism which will allow the Mojo to communicate to the outside world through standard Maven channels.
|Modifier and Type||Field and Description|
|Modifier and Type||Method and Description|
Perform whatever build-process behavior this
This is the main trigger for the
Furnish access to the standard Maven logging mechanism which is managed in this base class.
Inject a standard
static final String ROLE
rolehint for Plexus container
void execute() throws MojoExecutionException, MojoFailureException
Mavensystem, and allows the
Mojoto communicate errors.
MojoExecutionException- if an unexpected problem occurs. Throwing this exception causes a "BUILD ERROR" message to be displayed.
MojoFailureException- if an expected problem (such as a compilation failure) occurs. Throwing this exception causes a "BUILD FAILURE" message to be displayed.
void setLog(Log log)
Mavenlogging mechanism to allow this
Mojoto communicate events and feedback to the user.
log- a new logger
"error". This logger is the accepted means to display information to the user.
Copyright © 2001–2021 The Apache Software Foundation. All rights reserved.