Class MojoExecutorMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.twdata.maven.mojoexecutor.plugin.MojoExecutorMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="execute-mojo", defaultPhase=TEST, requiresDependencyResolution=TEST) public class MojoExecutorMojo extends org.apache.maven.plugin.AbstractMojoExecute a Mojo using the MojoExecutor.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanblockingEnable thread blocking per plugin GA (groupId & artifactId)private org.codehaus.plexus.configuration.xml.XmlPlexusConfigurationconfigurationPlugin configuration to use in the execution.private java.lang.StringgoalPlugin goal to execute.private booleanignoreMavenProjectIgnore injected maven projetcprivate static java.util.Set<java.lang.String>lockedKeysprivate org.apache.maven.project.MavenProjectmavenProjectThe project currently being build.private org.apache.maven.execution.MavenSessionmavenSessionThe current Maven session.private org.apache.maven.model.PluginpluginPlugin to execute.private org.apache.maven.plugin.BuildPluginManagerpluginManagerThe Maven BuildPluginManager component.private booleanquietDisable logging on executed mojos
-
Constructor Summary
Constructors Constructor Description MojoExecutorMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddisableLogging()voidexecute()private voidexecuteMojoImpl()private voidlock(java.lang.String key)private voidunlock(java.lang.String key)
-
-
-
Field Detail
-
lockedKeys
private static final java.util.Set<java.lang.String> lockedKeys
-
plugin
@Parameter(required=true) private org.apache.maven.model.Plugin plugin
Plugin to execute.
-
goal
@Parameter(required=true) private java.lang.String goal
Plugin goal to execute.
-
configuration
@Parameter private org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration configuration
Plugin configuration to use in the execution.
-
mavenProject
@Parameter(defaultValue="${project}", readonly=true) private org.apache.maven.project.MavenProject mavenProjectThe project currently being build.
-
mavenSession
@Parameter(defaultValue="${session}", readonly=true) private org.apache.maven.execution.MavenSession mavenSessionThe current Maven session.
-
pluginManager
@Component private org.apache.maven.plugin.BuildPluginManager pluginManager
The Maven BuildPluginManager component.
-
quiet
@Parameter(defaultValue="false") private boolean quiet
Disable logging on executed mojos
-
blocking
@Parameter(defaultValue="false") private boolean blocking
Enable thread blocking per plugin GA (groupId & artifactId)
-
ignoreMavenProject
@Parameter(defaultValue="false") private boolean ignoreMavenProject
Ignore injected maven projetc
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
executeMojoImpl
private void executeMojoImpl() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
disableLogging
private void disableLogging() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
lock
private void lock(java.lang.String key) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
unlock
private void unlock(java.lang.String key)
-
-