Full name:
org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.13:generate
Description:
Attributes:
Name | Type | Since | Description |
---|---|---|---|
addCompileSourceRoot | boolean | 0.1.9 | Add the output directory to the project as a source root, so that
the generated java types are compiled and included in the project
artifact. Default value is: true. |
annotationStyle | String | 0.3.1 | The style of annotations to use in the generated Java types.
Supported values:
Default value is: jackson2. |
classNamePrefix | String | 0.4.6 | Whether to add a prefix to generated classes. |
classNameSuffix | String | 0.4.6 | Whether to add a prefix to generated classes. |
constructorsRequiredPropertiesOnly | boolean | 0.4.8 | Whether generated constructors should have parameters for all
properties, or only required ones. |
customAnnotator | String | 0.3.6 | A fully qualified class name, referring to a custom annotator class
that implements org.jsonschema2pojo.Annotator and will
be used in addition to the one chosen by
annotationStyle.
If you want to use the custom annotator alone, set annotationStyle to none. Default value is: org.jsonschema2pojo.NoopAnnotator. |
customRuleFactory | String | 0.4.5 | A fully qualified class name, referring to an class that extends
org.jsonschema2pojo.rules.RuleFactory and will be used
to create instances of Rules used for code generation. Default value is: org.jsonschema2pojo.rules.RuleFactory. |
excludes | String[] | 0.4.3 | List of file patterns to exclude. |
generateBuilders | boolean | 0.1.2 | Whether to generate builder-style methods of the form
withXxx(value) (that return this),
alongside the standard, void-return setters. Default value is: false. |
includeConstructors | boolean | 0.4.8 | Whether to generate constructors or not |
includeHashcodeAndEquals | boolean | 0.3.1 | Whether to include hashCode and equals
methods in generated Java types. Default value is: true. |
includeJsr303Annotations | boolean | 0.3.2 | Whether to include JSR-303/349
annotations (for schema rules like minimum, maximum, etc) in
generated Java types.
Schema rules and the annotation they produce:
Default value is: false. |
includeToString | boolean | 0.3.1 | Whether to include a toString method in generated Java
types. Default value is: true. |
includes | String[] | 0.4.3 | List of file patterns to include. |
initializeCollections | boolean | - | Whether to initialize Set and List fields as empty collections, or
leave them as null. |
outputDirectory | File | 0.1.0 | Target directory for generated Java source files. Default value is: ${project.build.directory}/java-gen. |
outputEncoding | String | 0.4.0 | The character encoding that should be used when writing the
generated Java source files. |
parcelable | boolean | 0.4.11 | **EXPERIMENTAL** Whether to make the generated types 'parcelable'
(for Android development). |
propertyWordDelimiters | String | 0.2.2 | The characters that should be considered as word delimiters when
creating Java Bean property names from JSON property names. If
blank or not set, JSON properties will be considered to contain a
single word when creating Java Bean property names. Default value is: - _. |
removeOldOutput | boolean | 0.3.7 | Whether to empty the target directory before generation occurs, to
clear out all source files that have been generated previously.
Be warned, when activated this option will cause jsonschema2pojo to indiscriminately delete the entire contents of the target directory (all files and folders) before it begins generating sources. |
skip | boolean | 0.2.1 | Skip plugin execution (don't read/validate any schema files, don't
generate any java types). Default value is: false. |
sourceDirectory | String | 0.1.0 | Location of the JSON Schema file(s). Note: this may refer to a
single file or a directory of files. |
sourcePaths | String[] | 0.3.1 | An array of locations of the JSON Schema file(s). Note: each item
may refer to a single file or a directory of files. |
sourceType | String | 0.3.3 | The type of input documents that will be read
Supported values:
Default value is: jsonschema. |
targetPackage | String | 0.1.0 | Package name used for generated Java classes (for types where a
fully qualified name has not been supplied in the schema using the
'javaType' property). |
useCommonsLang3 | boolean | 0.4.1 | Whether to use commons-lang 3.x imports instead of commons-lang 2.x
imports when adding equals, hashCode and toString methods. |
useDoubleNumbers | boolean | 0.4.0 | Whether to use the java type double (or
Double) instead of float (or
Float) when representing the JSON Schema type
'number'. Default value is: true. |
useJodaDates | boolean | 0.4.0 | Whether to use DateTime instead of Date
when adding date type fields to generated Java types. |
useJodaLocalDates | boolean | 0.4.9 | Whether to use LocalDate instead of string when adding
string type fields of format date (not date-time) to generated Java
types. |
useJodaLocalTimes | boolean | 0.4.9 | Whether to use LocalTime instead of string when adding
string type fields of format time (not date-time) to generated Java
types. |
useLongIntegers | boolean | 0.2.2 | Whether to use the java type long (or
Long) instead of int (or
Integer) when representing the JSON Schema type
'integer'. Default value is: false. |
usePrimitives | boolean | 0.2.0 | Whether to use primitives (long, double,
boolean) instead of wrapper types where possible when
generating bean properties (has the side-effect of making those
properties non-null). Default value is: false. |
Supported values:
constructorsRequiredPropertiesOnly:
If you want to use the custom annotator alone, set annotationStyle to none.
Schema rules and the annotation they produce:
Be warned, when activated this option will cause jsonschema2pojo to indiscriminately delete the entire contents of the target directory (all files and folders) before it begins generating sources.
skip:
Supported values: