You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by michał <mi...@gmail.com> on 2013/10/22 15:53:57 UTC
avro-service-archetype
Hi,
I want to run avro-service-archetype available in maven central repository.
It has a protocol defined in order-service.avsc
What is the procedure to generate .java files in Eclipse using:
<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>
<goal>protocol</goal>
<goal>idl-protocol</goal>
</goals>
</execution>
</executions>
</plugin>
and then run the client and the server to comunicate?
PS
I know it is beginner question but I feel confused about how to generate the java files simply using the maven in Avro. The test is running ok but can't find any files in /atrget directory.
Re: avro-service-archetype
Posted by Mick <mi...@gmail.com>.
Well that is it. First m2e needs to run "generate-sources" than the Run
As-> Maven build install.
This was not obviuos to me at the start thank you.
W dniu 23.10.2013 17:20, Eric Wasserman pisze:
> If you have the m2e plugin for eclipse, you can right click the
> project and find "generate-sources" under one of the hierarchical
> menus. I think its called "Run...".
>
> Also you can run
>
> mvn generate-sources
>
> From the command line.
>
> On Oct 23, 2013, at 12:36 AM, "micha?" <michal.one1337@gmail.com
> <ma...@gmail.com>> wrote:
>
>> Ok, but how do you run it? It is made to eliminate the need to use
>> the tools jar and force maven to do it.
>> How should a simple HelloWorld look like using this archetype and
>> maven avro plugin?
>>
>>
>> W dniu 23.10.2013 03:57, Vignesh Srinivasan pisze:
>>> Hi
>>>
>>> I use the plugin as configured below
>>>
>>> <plugin>
>>> <groupId>org.apache.avro</groupId>
>>> <artifactId>avro-maven-plugin</artifactId>
>>> <version>1.7.4</version>
>>> <executions>
>>> <execution>
>>> <id>schemas</id>
>>> <phase>generate-sources</phase>
>>> <goals>
>>> <goal>schema</goal>
>>> <goal>idl-protocol</goal>
>>> </goals>
>>> <configuration>
>>> <stringType>String</stringType>
>>> <sourceDirectory>src/main/avro/</sourceDirectory>
>>> <outputDirectory>target/generated-sources/java/</outputDirectory>
>>> </configuration>
>>> </execution>
>>> </executions>
>>> </plugin>
>>>
>>> I have defined my avro schema files in src/main/avro directory.
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Oct 22, 2013 at 6:53 AM, micha? <michal.one1337@gmail.com
>>> <ma...@gmail.com>> wrote:
>>>
>>> Hi,
>>>
>>> I want to run avro-service-archetype available in maven central
>>> repository.
>>> It has a protocol defined in order-service.avsc
>>>
>>> What is the procedure to generate .java files in Eclipse using:
>>>
>>> <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>
>>> <goal>protocol</goal>
>>> <goal>idl-protocol</goal>
>>> </goals>
>>> </execution>
>>> </executions>
>>> </plugin>
>>>
>>> and then run the client and the server to comunicate?
>>>
>>> PS
>>> I know it is beginner question but I feel confused about how to
>>> generate the java files simply using the maven in Avro. The test
>>> is running ok but can't find any files in /atrget directory.
>>>
>>>
>>>
>>>
>>>
>>
Re: avro-service-archetype
Posted by Eric Wasserman <ew...@247-inc.com>.
If you have the m2e plugin for eclipse, you can right click the project and find "generate-sources" under one of the hierarchical menus. I think its called "Run...".
Also you can run
mvn generate-sources
>From the command line.
On Oct 23, 2013, at 12:36 AM, "micha?" <mi...@gmail.com>> wrote:
Ok, but how do you run it? It is made to eliminate the need to use the tools jar and force maven to do it.
How should a simple HelloWorld look like using this archetype and maven avro plugin?
W dniu 23.10.2013 03:57, Vignesh Srinivasan pisze:
Hi
I use the plugin as configured below
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>1.7.4</version>
<executions>
<execution>
<id>schemas</id>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
<goal>idl-protocol</goal>
</goals>
<configuration>
<stringType>String</stringType>
<sourceDirectory>src/main/avro/</sourceDirectory>
<outputDirectory>target/generated-sources/java/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
I have defined my avro schema files in src/main/avro directory.
On Tue, Oct 22, 2013 at 6:53 AM, micha? <mi...@gmail.com>> wrote:
Hi,
I want to run avro-service-archetype available in maven central repository.
It has a protocol defined in order-service.avsc
What is the procedure to generate .java files in Eclipse using:
<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>
<goal>protocol</goal>
<goal>idl-protocol</goal>
</goals>
</execution>
</executions>
</plugin>
and then run the client and the server to comunicate?
PS
I know it is beginner question but I feel confused about how to generate the java files simply using the maven in Avro. The test is running ok but can't find any files in /atrget directory.
Re: avro-service-archetype
Posted by michał <mi...@gmail.com>.
Ok, but how do you run it? It is made to eliminate the need to use the
tools jar and force maven to do it.
How should a simple HelloWorld look like using this archetype and maven
avro plugin?
W dniu 23.10.2013 03:57, Vignesh Srinivasan pisze:
> Hi
>
> I use the plugin as configured below
>
> <plugin>
> <groupId>org.apache.avro</groupId>
> <artifactId>avro-maven-plugin</artifactId>
> <version>1.7.4</version>
> <executions>
> <execution>
> <id>schemas</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>schema</goal>
> <goal>idl-protocol</goal>
> </goals>
> <configuration>
> <stringType>String</stringType>
> <sourceDirectory>src/main/avro/</sourceDirectory>
> <outputDirectory>target/generated-sources/java/</outputDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> I have defined my avro schema files in src/main/avro directory.
>
>
>
>
>
> On Tue, Oct 22, 2013 at 6:53 AM, michał <michal.one1337@gmail.com
> <ma...@gmail.com>> wrote:
>
> Hi,
>
> I want to run avro-service-archetype available in maven central
> repository.
> It has a protocol defined in order-service.avsc
>
> What is the procedure to generate .java files in Eclipse using:
>
> <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>
> <goal>protocol</goal>
> <goal>idl-protocol</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>
> and then run the client and the server to comunicate?
>
> PS
> I know it is beginner question but I feel confused about how to
> generate the java files simply using the maven in Avro. The test
> is running ok but can't find any files in /atrget directory.
>
>
>
>
>
Re: avro-service-archetype
Posted by Vignesh Srinivasan <sv...@gmail.com>.
Hi
I use the plugin as configured below
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>1.7.4</version>
<executions>
<execution>
<id>schemas</id>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
<goal>idl-protocol</goal>
</goals>
<configuration>
<stringType>String</stringType>
<sourceDirectory>src/main/avro/</sourceDirectory>
<outputDirectory>target/generated-sources/java/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
I have defined my avro schema files in src/main/avro directory.
On Tue, Oct 22, 2013 at 6:53 AM, michał <mi...@gmail.com> wrote:
> Hi,
>
> I want to run avro-service-archetype available in maven central repository.
> It has a protocol defined in order-service.avsc
>
> What is the procedure to generate .java files in Eclipse using:
>
> <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>
> <goal>protocol</goal>
> <goal>idl-protocol</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>
> and then run the client and the server to comunicate?
>
> PS
> I know it is beginner question but I feel confused about how to generate
> the java files simply using the maven in Avro. The test is running ok but
> can't find any files in /atrget directory.
>
>
>
>
>