'How can I import a folder of avro files in avro-maven-plugin?

I want to import multiple Avro files in a folder without specifying all Avro files, just the folder.

Current:

<plugin>
    <groupId>org.apache.avro</groupId>
    <artifactId>avro-maven-plugin</artifactId>
    <version>${avro.version}</version>
    <executions>
        <execution>
            <phase>generate-sources</phase>
            <goals>
                <goal>schema</goal>
            </goals>
            <configuration>
                <imports>
                    <import>${project.basedir}/src/main/resources/avro/HeaderRecord.avsc</import>
                </imports>
                <sourceDirectory>src/main/resources/avro</sourceDirectory>
                <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
                <stringType>String</stringType>
                <enableDecimalLogicalType>true</enableDecimalLogicalType>
            </configuration>
        </execution>
    </executions>
</plugin>

I want something like that:

<imports>${project.basedir}/src/main/resources/avro/**/*.avsc</imports>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source