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

    Fields
    Modifier and Type
    Field
    Description
    protected File
    Maven module base directory
    static final String
     
    protected File
    The properties file that contains the modules
    protected File
    If not specified, the directory where the file is located will be used as its base dir.
    protected org.apache.maven.project.MavenProject
    The current Maven project.
    protected Properties
    Plugin properties that are passed to the compiler
    protected ProtoModule[]
    The modules to generate code from
    protected File
    If 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected boolean
    Determine if the mojo execution should get skipped.

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • GENERATE_TEST_SOURCES_PHASE

      public static final String GENERATE_TEST_SOURCES_PHASE
      See Also:
    • project

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

      @Parameter protected File modulesFile
      The properties file that contains the modules
    • sourceBaseDir

      @Parameter protected File 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

      @Parameter protected File 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

      @Parameter protected ProtoModule[] protoModules
      The modules to generate code from
    • baseDir

      @Parameter(property="project.basedir", required=true) protected File baseDir
      Maven module base directory
    • properties

      @Parameter protected Properties 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.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • skipMojo

      protected boolean skipMojo()

      Determine if the mojo execution should get skipped.

      This is the case if:
      • skip is true
      • if the mojo gets executed on a project with packaging type 'pom' and forceMojoExecution is false
      Returns:
      true if the mojo execution should be skipped.
      Since:
      1.0.1