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

    Fields
    Modifier and Type
    Field
    Description
    private 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    private void
    processFiles(File[] mainFiles, File outputDir)
     

    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 Details

    • project

      @Parameter(property="project", required=true, readonly=true) protected org.apache.maven.project.MavenProject project
      The maven project.
    • mainSourceDirectory

      @Parameter(defaultValue="${basedir}/src/main/proto") private File mainSourceDirectory
      The directory where the proto files (*.proto) are located.
    • mainOutputDirectory

      @Parameter(defaultValue="${project.build.directory}/generated-sources/proto") private File mainOutputDirectory
      The directory where the output files will be located.
    • testSourceDirectory

      @Parameter(defaultValue="${basedir}/src/test/proto") private File testSourceDirectory
      The directory where the proto files (*.proto) are located.
    • testOutputDirectory

      @Parameter(defaultValue="${project.build.directory}/test-generated-sources/proto") private File testOutputDirectory
      The directory where the output files will be located.
    • type

      @Parameter(defaultValue="default") private String 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