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

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

        private void disableLogging()
                             throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException