类 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 StringDefines the scope of the classpath passed to the plugin.protected org.apache.maven.project.MavenProjectThe enclosing project.从接口继承的字段 org.apache.maven.plugin.Mojo
ROLE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidcollectProjectArtifactsAndClasspath(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 booleanprotected booleanisSkip()Check if the execution should be skippedprotected String[]Parses the argument string given by the user.protected voidRegister 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 projectThe enclosing project. -
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 artifactstheClasspathFiles- the list where to collect the scope specific output directories
-
parseCommandlineArgs
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
-