I was doing the confluent kafka tutorial Schema Registry Tutorial related to producer and consumer with serialization through Avro and I had the following error when executing 'mvn clean compile package ':

Failed to execute goal org.apache.avro:avro-maven-plugin:1.8.2:schema (default) on project java-client-avro-examples: Execution default of goal org.apache.avro:avro-maven-plugin:1.8.2:schema failed: A required class was missing while executing org.apache.avro:avro-maven-plugin:1.8.2:schema: Lorg/apache/avro/Schema$Parser;

Failed to execute goal org.apache.avro:avro-maven-plugin:1.8.2:schema (default) on project java-client-avro-examples: Execution default of goal org.apache.avro:avro-maven-plugin:1.8.2:schema failed: A required class was missing while executing org.apache.avro:avro-maven-plugin:1.8.2:schema: Lorg/apache/avro/Schema$Parser;


I've solved it by running the following maven command to empty the local repository:

mvn dependency:purge-local-repository -DactTransitively=false -DreResolve=false