Class BaseGenerateSourcesMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    GenerateSourcesMojo, GenerateTestSourcesMojo

    public abstract class BaseGenerateSourcesMojo
    extends org.apache.maven.plugin.AbstractMojo
    mvn net.morimekta.providence:providence-maven-plugin:1.3.1:help -Ddetail=true -Dgoal=compile
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean allow_language_reserved_names
      Allow reserved words that would cause name problems in some thrift generated code.
      protected java.io.File buildDir
      Location of the output artifact.
      protected boolean compileOutput
      If true will add the generated sources to be compiled.
      protected boolean generate_providence_core_types  
      protected boolean generated_annotation_version
      If true add version to generated annotations.
      protected boolean hazelcast_portable
      If set to true will add hazelcast annotations to messages and enums.
      protected boolean jackson
      If set to true will add jackson 2 annotations to messages and enums.
      protected boolean print_debug
      Print extra debug info to the maven log.
      protected org.apache.maven.project.MavenProject project  
      protected boolean public_constructors
      Generate public constructors with all fields as arguments for structs and exceptions.
      protected boolean require_enum_value
      If the thrift program parser should fail if enum value is missing for any enum value definition parsed.
      protected boolean require_field_id
      If the thrift program parser should fail if field ID is missing for any field definitions parsed.
      protected boolean rw_binary
      Generate model methods to read and write same as the binary protocol.
      protected boolean serializable
      Make all message types serializable.
      protected boolean skipIfMissingNamespace
      Skip thrift files if they are missing the java namespace.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      • 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
      • Methods inherited from interface org.apache.maven.plugin.Mojo

        execute
    • Field Detail

      • require_enum_value

        @Parameter(defaultValue="false",
                   property="providence.gen.require_enum_value",
                   alias="requireEnumValue")
        protected boolean require_enum_value
        If the thrift program parser should fail if enum value is missing for any enum value definition parsed.
      • require_field_id

        @Parameter(defaultValue="false",
                   property="providence.gen.require_field_id",
                   alias="requireFieldId")
        protected boolean require_field_id
        If the thrift program parser should fail if field ID is missing for any field definitions parsed.
      • allow_language_reserved_names

        @Parameter(defaultValue="true",
                   alias="allow_reserved_names",
                   property="providence.gen.allow_language_reserved_names")
        protected boolean allow_language_reserved_names
        Allow reserved words that would cause name problems in some thrift generated code. This allows reserved words as names, not thrift keywords. This applies to all type names (enums, messages, services, typedefs), all fields (message fields, method params, method throws), method names, const names and enum values.
      • jackson

        @Parameter(defaultValue="false",
                   property="providence.gen.jackson")
        protected boolean jackson
        If set to true will add jackson 2 annotations to messages and enums. Required additional dependency on jackson 2 extra libraries:
        • com.fasterxml.jackson.extra:jackson-annotations:2.x
        • com.fasterxml.jackson.extra:jackson-extra:2.x
        • com.fasterxml.jackson.extra:jackson-databind:2.x
      • rw_binary

        @Parameter(defaultValue="true",
                   property="providence.gen.rw_binary")
        protected boolean rw_binary
        Generate model methods to read and write same as the binary protocol. Can be turned off to reduce the amount of generated code. Serialization will work regardless, but keeping this enabled speeds up the binary serialization significantly.
      • serializable

        @Parameter(defaultValue="true",
                   property="providence.gen.serializable")
        protected boolean serializable
        Make all message types serializable. Defaults to true. If false, only exceptions will be serializable (as the java.lang.Throwable class implements serializable).
      • hazelcast_portable

        @Parameter(defaultValue="false",
                   property="providence.gen.hazelcast_portable")
        protected boolean hazelcast_portable
        If set to true will add hazelcast annotations to messages and enums.
      • generated_annotation_version

        @Parameter(defaultValue="true",
                   property="providence.gen.generated_annotation_version")
        protected boolean generated_annotation_version
        If true add version to generated annotations.
      • generate_providence_core_types

        @Parameter(defaultValue="false",
                   property="providence.gen.generate_providence_core_types")
        protected boolean generate_providence_core_types
      • public_constructors

        @Parameter(defaultValue="false",
                   property="providence.gen.public_constructors")
        protected boolean public_constructors
        Generate public constructors with all fields as arguments for structs and exceptions.
      • print_debug

        @Parameter(defaultValue="false",
                   property="providence.print_debug")
        protected boolean print_debug
        Print extra debug info to the maven log.
      • compileOutput

        @Parameter(defaultValue="true")
        protected boolean compileOutput
        If true will add the generated sources to be compiled.
      • skipIfMissingNamespace

        @Parameter(defaultValue="false",
                   property="providence.skip_if_missing_namespace")
        protected boolean skipIfMissingNamespace
        Skip thrift files if they are missing the java namespace.
      • buildDir

        @Parameter(defaultValue="${project.build.directory}",
                   readonly=true,
                   required=true)
        protected java.io.File buildDir
        Location of the output artifact.
      • project

        @Parameter(defaultValue="${project}",
                   readonly=true,
                   required=true)
        protected org.apache.maven.project.MavenProject project
    • Constructor Detail

      • BaseGenerateSourcesMojo

        public BaseGenerateSourcesMojo()