Class ExecMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="exec",
          requiresProject=true,
          requiresDependencyResolution=RUNTIME,
          defaultPhase=PROCESS_RESOURCES)
    public final class ExecMojo
    extends org.apache.maven.plugin.AbstractMojo
    Execute a command.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private class  ExecMojo.AntBuildListener
      BuilderListener implementation to log Ant events.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String commandlineArgs
      Command line argument.
      private java.lang.String executable
      Executable to execute.
      private org.apache.maven.project.MavenProject project
      The maven project.
      private java.io.File workingDir
      Working dir.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      ExecMojo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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

      • project

        @Parameter(defaultValue="${project}",
                   required=true,
                   readonly=true)
        private org.apache.maven.project.MavenProject project
        The maven project.
      • executable

        @Parameter(property="executable")
        private java.lang.String executable
        Executable to execute.
      • workingDir

        @Parameter(property="workingDir",
                   defaultValue="${project.build.directory}")
        private java.io.File workingDir
        Working dir.
      • commandlineArgs

        @Parameter(property="commandlineArgs")
        private java.lang.String commandlineArgs
        Command line argument.
    • Constructor Detail

      • ExecMojo

        public ExecMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException