Reputation: 9946
.avdl
Avro schema files in a schema registry, only .avsc
Avro schema files..avdl
Avro schema files into .avsc
Avro schema files.How can I convert an .avsc
Avro schema file into an .avdl
Avro schema file as part of a Maven build?
Upvotes: 0
Views: 1108
Reputation: 9946
One can convert .avdl
Avro schema files into .avsc
Avro schema files by leveraging the Maven exec-maven-plugin plugin:
<profile>
<id>avsc</id>
<dependencies>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro-tools</artifactId>
<version>${avro-tools.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>avsc-generation</id>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.apache.avro.tool.Main</mainClass>
<arguments>
<argument>idl2schemata</argument>
<!-- path to input .avdl file -->
<argument>path/to/AvdlFile.avdl</argument>
<!-- path to output directory -->
<argument>path/to/output-directory</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Upvotes: 1