org.apache.avro
avro-maven-plugin
1.11.0
generate-sources
schema
${project.basedir}/src/main/avro/
${project.basedir}/src/main/java/
However, the configuration section in the execution definition was not actually respected. Here’s an example. Notice I changes the source and output directory names to blah and flarp.
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>1.11.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/blah/</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/flarp/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
When I run the avro:schema target with debugging (
mvn clean avro:schema -X
), the output of the configuration in the logs do not reflect the changes.
[DEBUG] Configuring mojo 'org.apache.avro:avro-maven-plugin:1.11.0:schema' with basic configurator -->
[DEBUG] (f) createSetters = true
[DEBUG] (f) customConversions = []
[DEBUG] (f) customLogicalTypeFactories = []
[DEBUG] (f) enableDecimalLogicalType = false
[DEBUG] (f) fieldVisibility = PRIVATE
[DEBUG] (f) outputDirectory = /Users/stephennimmo/Projects/github/kubetrade/shared-schema/target/generated-sources/avro
[DEBUG] (f) project = MavenProject: com.kubetrade.shared:shared-schema:0.0.1-SNAPSHOT @ /Users/stephennimmo/Projects/github/kubetrade/shared-schema/pom.xml
[DEBUG] (f) sourceDirectory = /Users/stephennimmo/Projects/github/kubetrade/shared-schema/src/main/avro
[DEBUG] (f) testOutputDirectory = /Users/stephennimmo/Projects/github/kubetrade/shared-schema/target/generated-test-sources/avro
[DEBUG] (f) testSourceDirectory = /Users/stephennimmo/Projects/github/kubetrade/shared-schema/src/test/avro
[DEBUG] (f) velocityToolsClassesNames = []
[DEBUG] -- end configuration --
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>1.11.0</version>
<configuration>
<sourceDirectory>${project.basedir}/src/main/blah/</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/flarp/</outputDirectory>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
</execution>
</executions>
</plugin>
[DEBUG] Configuring mojo 'org.apache.avro:avro-maven-plugin:1.11.0:schema' with basic configurator -->
[DEBUG] (f) createSetters = true
[DEBUG] (f) customConversions = []
[DEBUG] (f) customLogicalTypeFactories = []
[DEBUG] (f) enableDecimalLogicalType = false
[DEBUG] (f) fieldVisibility = PRIVATE
[DEBUG] (f) outputDirectory = /Users/stephennimmo/Projects/github/kubetrade/shared-schema/src/main/flarp
[DEBUG] (f) project = MavenProject: com.kubetrade.shared:shared-schema:0.0.1-SNAPSHOT @ /Users/stephennimmo/Projects/github/kubetrade/shared-schema/pom.xml
[DEBUG] (f) sourceDirectory = /Users/stephennimmo/Projects/github/kubetrade/shared-schema/src/main/blah
[DEBUG] (f) testOutputDirectory = /Users/stephennimmo/Projects/github/kubetrade/shared-schema/target/generated-test-sources/avro
[DEBUG] (f) testSourceDirectory = /Users/stephennimmo/Projects/github/kubetrade/shared-schema/src/test/avro
[DEBUG] (f) velocityToolsClassesNames = []
[DEBUG] -- end configuration --