[ 
https://issues.apache.org/jira/browse/AVRO-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14958926#comment-14958926
 ] 

Zoltan Farkas commented on AVRO-1603:
-------------------------------------

We write our schemas in avdl.
We use the maven plugin we generate the java classes.
We have made changes to the plugin to also generate the avsc schema file along 
with the java classes.

Here is some detail on our use case:

We develop our avro schemas in their own maven projects.
During the build of the maven project we do:

1. Generate java, c# classes and publish to maven repo.
2. Generate avsc files, package to avro repo. (we have modified the current 
plugin to allow this)
3. Validate compatibility with the previous released schemas. (retrieve 
previously release schemas from maven and validate compatibility)
4. Validate doc field presence for all schema records, fields (mandatory)
(3 and 4 we do we our own maven plugin.)

As you can observe we use maven repository as a schema repository and maven to 
"build" schema projects.

This allows us to reuse schemas, and build schemas that depend on other schemas 
taking advantage of maven dependency mechanism.
Projects don't need to each generate their java classes, they are generated 
once and reused. 

If a java process  is reading a Record version 4.0 and receives a version 3.0 
it can always retrieve the 3.0  schema from the maven repo and use it to decode 
the message. Like any maven artifact schema will be cached locally into the 
maven repo cache...





> maven avro plugin to also generate avsc files.
> ----------------------------------------------
>
>                 Key: AVRO-1603
>                 URL: https://issues.apache.org/jira/browse/AVRO-1603
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>    Affects Versions: 1.8.0
>            Reporter: Zoltan Farkas
>            Priority: Minor
>
> It would be nice to be able to generate also all avsc schema files during 
> compilation.
> This schema files than could be packages, versioned, distributed with maven...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to