Class ProtoMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.fusesource.hawtbuf.proto.compiler.ProtoMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="compile",
defaultPhase=PROCESS_SOURCES)
public class ProtoMojo
extends org.apache.maven.plugin.AbstractMojo
A Maven Mojo so that the Proto compiler can be used with maven.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate File
The directory where the output files will be located.private File
The directory where the proto files (*.proto
) are located.protected org.apache.maven.project.MavenProject
The maven project.private File
The directory where the output files will be located.private File
The directory where the proto files (*.proto
) are located.private String
The type of generator to run.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
private void
processFiles
(File[] mainFiles, File outputDir) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
project
@Parameter(property="project", required=true, readonly=true) protected org.apache.maven.project.MavenProject projectThe maven project. -
mainSourceDirectory
The directory where the proto files (*.proto
) are located. -
mainOutputDirectory
@Parameter(defaultValue="${project.build.directory}/generated-sources/proto") private File mainOutputDirectoryThe directory where the output files will be located. -
testSourceDirectory
The directory where the proto files (*.proto
) are located. -
testOutputDirectory
@Parameter(defaultValue="${project.build.directory}/test-generated-sources/proto") private File testOutputDirectoryThe directory where the output files will be located. -
type
The type of generator to run.
-
-
Constructor Details
-
ProtoMojo
public ProtoMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
processFiles
private void processFiles(File[] mainFiles, File outputDir) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-