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 ProvidenceDependency[] dependencies
      Dependencies to providence artifacts.
      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 org.apache.maven.artifact.repository.ArtifactRepository localRepository  
      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 java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories  
      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 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 interface org.apache.maven.plugin.Mojo

        execute
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
      • 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.
      • 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.
      • dependencies

        @Parameter
        protected ProvidenceDependency[] dependencies
        Dependencies to providence artifacts. 'providence' classifier and 'zip' type is implied here, but can be overridden. The thrift files from these artifacts will be available for inclusion by compiled thrift files, but will not be compiled themselves.
      • 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)
        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
      • localRepository

        @Parameter(defaultValue="${localRepository}",
                   readonly=true,
                   required=true)
        protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
      • remoteRepositories

        @Parameter(defaultValue="${project.remoteRepositories}",
                   readonly=true,
                   required=true)
        protected java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories
    • Constructor Detail

      • BaseGenerateSourcesMojo

        public BaseGenerateSourcesMojo()