You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Vinicius Carvalho <vi...@gmail.com> on 2016/08/24 22:59:36 UTC

Maven plugin issues with sourceDirectory

Hi, I'm trying to set the plugin (tried 1.7.7 and 1.8.1) to change the
location of the avsc files:

<plugin>
   <groupId>org.apache.avro</groupId>
   <artifactId>avro-maven-plugin</artifactId>
   <version>1.8.1</version>
   <executions>
      <execution>
         <phase>generate-sources</phase>
         <goals>
            <goal>schema</goal>
         </goals>
         <configuration>
            <testSourceDirectory>${project.basedir}/src/test/resources/</testSourceDirectory>
            <sourceDirectory>${project.basedir}/src/main/resources/</sourceDirectory>
         </configuration>
      </execution>
   </executions>
</plugin>

But when I run it I get an error:

neither sourceDirectory:
/Users/vcarvalho/projects/java/sandbox/expression-demo/src/main/avro or
testSourceDirectory:
/Users/vcarvalho/projects/java/sandbox/expression-demo/src/test/avro are
directories

And from debugging maven output

<configuration>
  <createSetters default-value="true"/>
  <fieldVisibility default-value="PUBLIC_DEPRECATED"/>
  <outputDirectory
default-value="${project.build.directory}/generated-sources/avro">${outputDirectory}</outputDirectory>
  <project default-value="${project}"/>
  <sourceDirectory
default-value="${basedir}/src/main/avro">${sourceDirectory}</sourceDirectory>
  <stringType>${stringType}</stringType>
  <templateDirectory>${templateDirectory}</templateDirectory>
  <testOutputDirectory
default-value="${project.build.directory}/generated-test-sources/avro">${outputDirectory}</testOutputDirectory>
  <testSourceDirectory
default-value="${basedir}/src/test/avro">${sourceDirectory}</testSourceDirectory>
</configuration>

Seems that the plugin is just ignoring anything that is set to configure
its source directories.

Am I missing something here?

Regards