Class 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 blocking
      Enable thread blocking per plugin GA (groupId & artifactId)
      private org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration configuration
      Plugin configuration to use in the execution.
      private java.lang.String goal
      Plugin goal to execute.
      private boolean ignoreMavenProject
      Ignore injected maven projetc
      private static java.util.Set<java.lang.String> lockedKeys  
      private org.apache.maven.project.MavenProject mavenProject
      The project currently being build.
      private org.apache.maven.execution.MavenSession mavenSession
      The current Maven session.
      private org.apache.maven.model.Plugin plugin
      Plugin to execute.
      private org.apache.maven.plugin.BuildPluginManager pluginManager
      The Maven BuildPluginManager component.
      private boolean quiet
      Disable logging on executed mojos
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void disableLogging()  
      void execute()  
      private void executeMojoImpl()  
      private void lock​(java.lang.String key)  
      private void unlock​(java.lang.String key)  
      • 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

      • 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 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 Detail

      • MojoExecutorMojo

        public MojoExecutorMojo()
    • 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)