avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohini Uppuluri <roh...@glassdoor.com>
Subject RE: Specifying source and output directories for generated java code
Date Wed, 18 Jun 2014 23:57:26 GMT
Yes, I tried that too. It doesn’t work for me.

From: Lewis John Mcgibbney [mailto:lewis.mcgibbney@gmail.com]
Sent: Wednesday, June 18, 2014 4:46 PM
To: user@avro.apache.org
Subject: Re: Specifying source and output directories for generated java code

Maybe you can try prepending

${project.dir}/ to the following directories

<sourceDirectory>src/main/resources/avro</sourceDirectory>                   
                                    <outputDirectory>src/main/java/</outputDirectory>

On Wed, Jun 18, 2014 at 7:18 PM, Rohini Uppuluri <rohini@glassdoor.com<mailto:rohini@glassdoor.com>>
wrote:



Hi,

I am trying to change the Source directory, output directory ad field visibility for generated
sources and I Can’t seem to override the defaults.
My generated sources are in the default directory ${project.dir}/target/generated-sources/avro
Have I not configured correctly?

I am using avro version 1.7.6

When I tried to run in debug mode,  I see this
$mvn avro:idl-protocol --debug
…
…
…

[DEBUG] Configuring mojo 'org.apache.avro:avro-maven-plugin:1.7.6:idl-protocol' with basic
configurator -->
[DEBUG]   (f) createSetters = true
[DEBUG]   (f) fieldVisibility = PUBLIC_DEPRECATED
[DEBUG]   (f) outputDirectory = xxx\target\generated-sources\avro
[DEBUG]   (f) project = MavenProject: xxx\pom.xml
[DEBUG]   (f) sourceDirectory = xxx/src\main\avro
[DEBUG]   (f) testOutputDirectory = xxx\target\generated-test-sources\avro
[DEBUG]   (f) testSourceDirectory = xxx\src\test\avro
[DEBUG] -- end configuration --
[INFO] –

Here is my entry from pom:

<plugin>
                                  <groupId>org.apache.avro</groupId>
                                  <artifactId>avro-maven-plugin</artifactId>
                                  <version>${avro.version}</version>
                                  <executions>
                                         <execution>
                                                <id>schemas</id>
                                                <phase>generate-sources</phase>
                                                <goals>
                                                       <goal>schema</goal>
                                                       <goal>protocol</goal>
                                                       <goal>idl-protocol</goal>
                                                </goals>
                                                <configuration>
                                                       <sourceDirectory>src/main/resources/avro</sourceDirectory>
                                                       <outputDirectory>src/main/java/</outputDirectory>
                                                       <fieldVisibility>PRIVATE</fieldVisibility>
                                                       <includes>
                                                              <include>*/*.avdl</include>
                                                       </includes>
                                                </configuration>
                                         </execution>
                                  </executions>
                           </plugin>



--
Lewis
Mime
View raw message