类 AbstractExecMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.baidu.jprotobuf.mojo.AbstractExecMojo
所有已实现的接口:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
直接已知子类:
PreCompileMojo

public abstract class AbstractExecMojo extends org.apache.maven.plugin.AbstractMojo
This class is used for unifying functionality between the 2 mojo exec plugins ('java' and 'exec'). It handles parsing the arguments and adding source/test folders.
作者:
Philippe Jacot (PJA), Jerome Lacoste
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    protected String
    Defines the scope of the classpath passed to the plugin.
    protected org.apache.maven.project.MavenProject
    The enclosing project.

    从接口继承的字段 org.apache.maven.plugin.Mojo

    ROLE
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    protected void
    collectProjectArtifactsAndClasspath(List<org.apache.maven.artifact.Artifact> artifacts, List<File> theClasspathFiles)
    Collects the project artifacts in the specified List and the project specific classpath (build output and build test output) Files in the specified List, depending on the plugin classpathScope value.
    protected boolean
     
    protected boolean
    Check if the execution should be skipped
    protected String[]
    Parses the argument string given by the user.
    protected void
    Register compile and compile tests source roots if necessary

    从类继承的方法 org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 org.apache.maven.plugin.Mojo

    execute
  • 字段详细资料

    • project

      @Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
      The enclosing project.
    • classpathScope

      @Parameter(property="exec.classpathScope", defaultValue="runtime") protected String classpathScope
      Defines the scope of the classpath passed to the plugin. Set to compile,test,runtime or system depending on your needs. Since 1.1.2, the default value is 'runtime' instead of 'compile'.
  • 构造器详细资料

    • AbstractExecMojo

      public AbstractExecMojo()
  • 方法详细资料

    • collectProjectArtifactsAndClasspath

      protected void collectProjectArtifactsAndClasspath(List<org.apache.maven.artifact.Artifact> artifacts, List<File> theClasspathFiles)
      Collects the project artifacts in the specified List and the project specific classpath (build output and build test output) Files in the specified List, depending on the plugin classpathScope value.
      参数:
      artifacts - the list where to collect the scope specific artifacts
      theClasspathFiles - the list where to collect the scope specific output directories
    • parseCommandlineArgs

      protected String[] parseCommandlineArgs() throws org.apache.maven.plugin.MojoExecutionException
      Parses the argument string given by the user. Strings are recognized as everything between STRING_WRAPPER. PARAMETER_DELIMITER is ignored inside a string. STRING_WRAPPER and PARAMETER_DELIMITER can be escaped using ESCAPE_CHAR.
      返回:
      Array of String representing the arguments
      抛出:
      org.apache.maven.plugin.MojoExecutionException - for wrong formatted arguments
    • hasCommandlineArgs

      protected boolean hasCommandlineArgs()
      返回:
      true of the mojo has command line arguments
    • registerSourceRoots

      protected void registerSourceRoots()
      Register compile and compile tests source roots if necessary
    • isSkip

      protected boolean isSkip()
      Check if the execution should be skipped
      返回:
      true to skip