You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Rohini Uppuluri <ro...@glassdoor.com> on 2014/06/19 01:18:04 UTC
Specifying source and output directories for generated java code
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>
Re: Specifying source and output directories for generated java code
Posted by Lewis John Mcgibbney <le...@gmail.com>.
I would review all of your paths, the output would indicate that there are
problems with them.
On Wed, Jun 18, 2014 at 10:51 PM, Rohini Uppuluri <ro...@glassdoor.com>
wrote:
> Yes, I am on windows. Running this from Cygwin.
>
>
>
> *From:* Lewis John Mcgibbney [mailto:lewis.mcgibbney@gmail.com]
> *Sent:* Wednesday, June 18, 2014 5:01 PM
> *To:* user@avro.apache.org
> *Subject:* Re: Specifying source and output directories for generated
> java code
>
>
>
> There appears to be discrepancies between '/' and '\' in your original
> post.
> Can you clarify if you are on Windows or another platform?
>
> This _may_ be the problem.
>
> hth
>
>
>
> On Wed, Jun 18, 2014 at 7:57 PM, Rohini Uppuluri <ro...@glassdoor.com>
> wrote:
>
> 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 <ro...@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*
>
>
>
>
> --
> *Lewis*
>
--
*Lewis*
RE: Specifying source and output directories for generated java code
Posted by Rohini Uppuluri <ro...@glassdoor.com>.
Yes, I am on windows. Running this from Cygwin.
From: Lewis John Mcgibbney [mailto:lewis.mcgibbney@gmail.com]
Sent: Wednesday, June 18, 2014 5:01 PM
To: user@avro.apache.org
Subject: Re: Specifying source and output directories for generated java code
There appears to be discrepancies between '/' and '\' in your original post.
Can you clarify if you are on Windows or another platform?
This _may_ be the problem.
hth
On Wed, Jun 18, 2014 at 7:57 PM, Rohini Uppuluri <ro...@glassdoor.com>> wrote:
Yes, I tried that too. It doesn’t work for me.
From: Lewis John Mcgibbney [mailto:lewis.mcgibbney@gmail.com<ma...@gmail.com>]
Sent: Wednesday, June 18, 2014 4:46 PM
To: user@avro.apache.org<ma...@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 <ro...@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
--
Lewis
Re: Specifying source and output directories for generated java code
Posted by Lewis John Mcgibbney <le...@gmail.com>.
There appears to be discrepancies between '/' and '\' in your original post.
Can you clarify if you are on Windows or another platform?
This _may_ be the problem.
hth
On Wed, Jun 18, 2014 at 7:57 PM, Rohini Uppuluri <ro...@glassdoor.com>
wrote:
> 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 <ro...@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*
>
--
*Lewis*
RE: Specifying source and output directories for generated java code
Posted by Rohini Uppuluri <ro...@glassdoor.com>.
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 <ro...@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
Re: Specifying source and output directories for generated java code
Posted by Lewis John Mcgibbney <le...@gmail.com>.
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 <ro...@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*