Class ProtoCompilerMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.protostuff.mojo.ProtoCompilerMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="compile",
configurator="include-project-dependencies",
requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
public class ProtoCompilerMojo
extends org.apache.maven.plugin.AbstractMojo
Compiles proto files to java/gwt/etc.
- Author:
- David Yu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FileMaven module base directorystatic final Stringprotected FileThe properties file that contains the modulesprotected FileIf not specified, the directory where the file is located will be used as its base dir.protected org.apache.maven.project.MavenProjectThe current Maven project.protected PropertiesPlugin properties that are passed to the compilerprotected ProtoModule[]The modules to generate code fromprotected FileIf not specified, the directory where the file is located will be used as its base dir.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
GENERATE_TEST_SOURCES_PHASE
- See Also:
-
project
@Parameter(property="project", required=true, readonly=true) protected org.apache.maven.project.MavenProject projectThe current Maven project. -
modulesFile
The properties file that contains the modules -
sourceBaseDir
If not specified, the directory where the file is located will be used as its base dir.This is only relevent when
is provided.- Since:
- 1.0.8
-
outputBaseDir
If not specified, the directory where the file is located will be used as its base dir.This is only relevent when
is provided.- Since:
- 1.0.8
-
protoModules
The modules to generate code from -
baseDir
Maven module base directory -
properties
Plugin properties that are passed to the compiler- Since:
- 1.3.1
-
-
Constructor Details
-
ProtoCompilerMojo
public ProtoCompilerMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
skipMojo
protected boolean skipMojo()Determine if the mojo execution should get skipped.
This is the case if:skipistrue- if the mojo gets executed on a project with packaging type 'pom' and
forceMojoExecutionisfalse
- Returns:
trueif the mojo execution should be skipped.- Since:
- 1.0.1
-