|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.AbstractMojo org.kuali.maven.mojo.s3.BaseMojo
public abstract class BaseMojo
Mojo essentials. Contains the "skip" logic that is the de facto standard for maven plugins. Contains a number of maven related properties that are common to most mojos. Also sets up logging so that if libraries called by a mojo issue log statements to Jakarta Commons Logging or Log4j, those log messages are shown in maven's output
Field Summary | |
---|---|
private String |
encoding
The encoding to use when reading/writing files. |
private boolean |
forceMojoExecution
Setting this parameter to true will force the execution of this mojo, even if it would get skipped
usually. |
static String |
FS
Convenience reference to System.getProperty("file.separator"). |
private org.apache.maven.execution.MavenSession |
mavenSession
|
private org.apache.maven.project.MavenProject |
project
The Maven project this plugin runs in. |
private org.apache.maven.settings.Settings |
settings
|
private boolean |
skip
When true , skip the execution of this mojo. |
static String |
SKIP_PACKAGING_TYPE
Skip packaging if type is "pom". |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
BaseMojo()
|
Method Summary | |
---|---|
void |
execute()
|
protected abstract void |
executeMojo()
This method is called after logging has been configured and only if mojo execution should not be skipped. |
String |
getEncoding()
|
org.apache.maven.execution.MavenSession |
getMavenSession()
|
org.apache.maven.project.MavenProject |
getProject()
|
org.apache.maven.settings.Settings |
getSettings()
|
boolean |
isForceMojoExecution()
|
boolean |
isSkip()
|
void |
setEncoding(String encoding)
|
void |
setForceMojoExecution(boolean forceMojoExecution)
|
void |
setMavenSession(org.apache.maven.execution.MavenSession mavenSession)
|
void |
setProject(org.apache.maven.project.MavenProject project)
|
void |
setSettings(org.apache.maven.settings.Settings settings)
|
void |
setSkip(boolean skip)
|
protected boolean |
skipMojo()
Determine if the mojo execution should get skipped. |
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 Detail |
---|
public static final String FS
public static final String SKIP_PACKAGING_TYPE
private boolean skip
true
, skip the execution of this mojo.
private boolean forceMojoExecution
true
will force the execution of this mojo, even if it would get skipped
usually.
private String encoding
private org.apache.maven.project.MavenProject project
private org.apache.maven.settings.Settings settings
private org.apache.maven.execution.MavenSession mavenSession
Constructor Detail |
---|
public BaseMojo()
Method Detail |
---|
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected abstract void executeMojo() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected boolean skipMojo()
Determine if the mojo execution should get skipped.
This is the case if:skip
is true
forceMojoExecution
is
false
true
if the mojo execution should be skipped.public boolean isSkip()
public void setSkip(boolean skip)
skip
- the skip to setpublic boolean isForceMojoExecution()
public void setForceMojoExecution(boolean forceMojoExecution)
forceMojoExecution
- the forceMojoExecution to setpublic String getEncoding()
public void setEncoding(String encoding)
encoding
- the encoding to setpublic org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject project)
project
- the project to setpublic org.apache.maven.settings.Settings getSettings()
public void setSettings(org.apache.maven.settings.Settings settings)
settings
- the settings to setpublic org.apache.maven.execution.MavenSession getMavenSession()
public void setMavenSession(org.apache.maven.execution.MavenSession mavenSession)
mavenSession
- the mavenSession to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |