<build>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>${avro.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
<goal>protocol</goal>
<goal>idl-protocol</goal>
</goals>
<configuration>
<fieldVisibility>public</fieldVisibility>
<stringType>String</stringType>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>| avro-tools | Plugin | SpecificCompiler properties and accessors | Description |
|---|---|---|---|
| x | customConversions = new String[0] |
specificDatasc.addLogicalTypeConversions(SpecificData) sc.addCustomConversion(Class<?>)sc.getUsedConversionClasses() |
|
| x | customLogicalTypeFactories = new String[0] |
LogicalTypes.register(...) | |
| x | x | queue | |
| x | x | protocol | |
| x | x | velocityEngine | |
| x | velocityToolsClassesNames = new String[0] |
additionalVelocityToolssc.setAdditionalVelocityTools(List<Object>) |
Puts instances of any object into the velocity context (references by their simple class name). |
| x | templateDirectory = "/org/apache/avro/compiler/specific/templates/java/classic/" |
templateDir = "/org/apache/avro/compiler/specific/templates/java/classic/"(Overridden by org.apache.avro.specific.templates)sc.setTemplateDir(String) |
Where to find the velocity templates. |
[-fieldVisibility <visibilityType>] |
fieldVisibility = private |
fieldVisibility = PRIVATEsc.setFieldVisibility(FieldVisibility)sc.deprecatedFields()sc.publicFields()sc.privateFields() |
Record fields should be public @Deprecated public, or private |
| x | createSetters = true |
**createSetters = true****sc.isCreateSetters()sc.setCreateSetters(boolean) |
Whether to create setters for fields of the record. |
| x | createOptionalGetters = false |
**createOptionalGetters = false****sc.isCreateOptionalGetters()sc.setCreateOptionalGetters(boolean) |
Whether to create additional getters getOptionalMyField() for fields of the record. |
| x | gettersReturnOptional = false |
gettersReturnOptional = falsesc.isGettersReturnOptional()sc.setGettersReturnOptional(boolean) |
Whether the getters return Optional<...> instead of possibly null. |
| x | optionalGettersForNullableFieldsOnly = false |
optionalGettersForNullableFieldsOnly = falsesc.isOptionalGettersForNullableFieldsOnly()sc.setOptionalGettersForNullableFieldsOnly(boolean) |
If gettersReturnOptional, only if they are actually nullable. |
| x | enableDecimalLogicalType = false |
enableDecimalLogicalType = falsesc.setEnableDecimalLogicalType() |
Whether to create setters for fields of the record. |
| x | x | createAllArgsConstructor = truesc.isCreateAllArgsConstructor |
If possible, create a constructor with every field. |
[-encoding <outputencoding>] |
x | outputCharacterEncodingsc.setOutputCharacterEncoding(String) |
|
[-bigDecimal] |
x | enableDecimalLogicalTypesc.setEnableDecimalLogicalType |
Whether to use the Decimal type |
| x | x | suffix = .javasc.setSuffix(String) |
|
-string to use String, else CharSequence |
stringType = "CharSequence" | stringType = CharSequencesetStringType(StringType) |
One of CharSequence, String, Utf8 |
input |
sourceDirectory = "${basedir}/src/main/avro" |
||
outputdir |
outputDirectory = "${project.build.directory}/generated-sources/avro" |
||
| x | testSourceDirectory = "${basedir}/src/main/avro" |
||
| x | testOutputDirectory = "${project.build.directory}/generated-sources/avro" |
||
| x | imports | ||
| x | excludes = new String[0] |
||
| x | testExcludes = new String[0] |
||
| x | includes = new String[] { "**/*.avsc" } |
SchemaMojo (.avpr for ProtocolMojo) |
|
| x | testIncludes = new String[] { "**/*.avsc" } |
SchemaMojo (.avpr for ProtocolMojo) |
-
Add AVRO-2937 to this list.
-
Apply a same order
-
Align the documentation and defaults
-
Maven plugin defaults sometimes in parameter sometimes set?
-
Maven plugin testSourceDirectory have property set to sourceDirectory
-
" -string - use java.lang.String instead of Utf8"is wrong ?