My question is similar to Unable to compile and create .avro file from .avsc using Maven
I have tried all possible things, checked the maven project 100 times, still
I publish a simple demo which is fully tested and 100% works https://github.com/xmeng1/avro-maven-demo. There are two important things for generating code by using the Avro
mvn compile or mvn package, we can put configuration under the execution. If we want to generate code when running goal mvn avro:scheme, we need put the configuration to the plugin directly. (the demo includes two type configuration){"namespace": "com.xx.xx.demo", "name": "Foo"}, the Foo.java will be created under the package com.xx.xx.demo