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.AbstractMojo
Execute a Mojo using the MojoExecutor.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
    Enable thread blocking per plugin GA (groupId & artifactId)
    private org.codehaus.plexus.configuration.PlexusConfiguration
    Plugin configuration to use in the execution.
    private String
    Plugin goal to execute.
    private boolean
    Ignore injected maven projetc
    private static final Set<String>
     
    private org.apache.maven.project.MavenProject
    The project currently being build.
    private org.apache.maven.execution.MavenSession
    The current Maven session.
    private org.apache.maven.model.Plugin
    Plugin to execute.
    private org.apache.maven.plugin.BuildPluginManager
    The Maven BuildPluginManager component.
    private boolean
    Disable logging on executed mojos

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

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
     
    void
     
    private void
     
    private void
    lock(String key)
     
    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

    • lockedKeys

      private static final Set<String> lockedKeys
    • plugin

      @Parameter(required=true) private org.apache.maven.model.Plugin plugin
      Plugin to execute.
    • goal

      @Parameter(required=true) private String goal
      Plugin goal to execute.
    • configuration

      @Parameter private org.codehaus.plexus.configuration.PlexusConfiguration configuration
      Plugin configuration to use in the execution.
    • mavenProject

      @Parameter(defaultValue="${project}", readonly=true) private org.apache.maven.project.MavenProject mavenProject
      The project currently being build.
    • mavenSession

      @Parameter(defaultValue="${session}", readonly=true) private org.apache.maven.execution.MavenSession mavenSession
      The 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
  • Constructor Details

    • MojoExecutorMojo

      public MojoExecutorMojo()
  • Method Details

    • 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(String key) throws InterruptedException
      Throws:
      InterruptedException
    • unlock

      private void unlock(String key)