I’m working on a Spring Boot project where I use Avro to generate Java classes from .avsc
schema files. The Avro classes are generated correctly in the target/generated-sources/avro
directory, but I’m having trouble importing these classes into my main project code in IntelliJ IDEA.
project structure:
enter image description here
source floder (Module):
enter image description here
Pom Avro :
<!-- Plugin Avro pour générer des classes Java à partir de schémas Avro -->
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>1.10.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/resources/avro</sourceDirectory>
<outputDirectory>${project.basedir}/target/generated-sources/avro</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
Am I missing a step in the configuration or project setup?
Driss Outraah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.