Return-Path: X-Original-To: apmail-avro-user-archive@www.apache.org Delivered-To: apmail-avro-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 251EC602A for ; Wed, 15 Jun 2011 01:25:17 +0000 (UTC) Received: (qmail 76656 invoked by uid 500); 15 Jun 2011 01:25:16 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 76616 invoked by uid 500); 15 Jun 2011 01:25:16 -0000 Mailing-List: contact user-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@avro.apache.org Delivered-To: mailing list user@avro.apache.org Received: (qmail 76608 invoked by uid 99); 15 Jun 2011 01:25:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 01:25:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sinchronized.arun@gmail.com designates 209.85.214.171 as permitted sender) Received: from [209.85.214.171] (HELO mail-iw0-f171.google.com) (209.85.214.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 01:25:09 +0000 Received: by iwn8 with SMTP id 8so5815285iwn.30 for ; Tue, 14 Jun 2011 18:24:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=wAj4UxK/p/tnlwqTw81T4CdvFgwC/AwjsC/Qf8xgCaU=; b=Her4uS65imU9ZBL+nnx1V4fM3iyXCj8KDUKc4ki1Rc7I87fxLNy/FDd33kkiuX7uw3 nJ2jyDgxoHkVlt8Kdl58FzQ0445+XVvXq1SIwq1gnAKaqsCyWF4opjeXvhWQIf8iauGo 9CEJA6d1n68Saa25rjm9EyvY0ONhQbzxJaLjQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=tf29hcVe2hPDMQ/wYCFT/cw6MYt61Mm7d3D8uu0bIVbi00snqC9lwSX8sNEBnK3S7k EXWySBR4dxflQse1DCXahDqRuoDfgDFU8PQSEdUSDYR8qP3UnSerHPzrUfo+sigTlHsD yVDqwJX/jCAvC4d0p2L9D51Cn2fYmnRC5WAvk= MIME-Version: 1.0 Received: by 10.231.179.197 with SMTP id br5mr7458451ibb.146.1308101088120; Tue, 14 Jun 2011 18:24:48 -0700 (PDT) Received: by 10.231.168.148 with HTTP; Tue, 14 Jun 2011 18:24:47 -0700 (PDT) In-Reply-To: References: Date: Tue, 14 Jun 2011 18:24:47 -0700 Message-ID: Subject: Re: avro-maven-plugin in eclipse? From: Arun Ramakrishnan To: user@avro.apache.org Content-Type: multipart/alternative; boundary=001636b14cb0b00f3804a5b60480 X-Virus-Checked: Checked by ClamAV on apache.org --001636b14cb0b00f3804a5b60480 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Thanks James and Scott. Got it working. But, had to explicitly specify all the paths just like in James's config example even though I am following th= e default locations. On Tue, Jun 14, 2011 at 12:32 PM, Scott Carey wrot= e: > > To configure the source and destination directories, it looks something > like: > > org.apache.avro > avro-maven-plugin > 1.5.1 > > > schemas > generate-sources > > schema > > > src/main/schemata/avro > > target/generated-sources/avro > > > > > > (which does only *.avsc via the schema goal) > > https://cwiki.apache.org/confluence/display/AVRO/Build+Documentation > > Covers the Avro build, and similar works for me in other projects. > > In particular, it seems as though one must do the "Maven > Update Project > Configuration" step on a maven project to get it to add source directorie= s > generated by plugins. > > I usually do "Import =85. Existing Maven Project" Followed immediately= by > "Maven > Update Project Configuration" on the project. > > > > On 6/14/11 11:46 AM, "Arun Ramakrishnan" > wrote: > > From the command line > "mvn avro:idl-protocol" finds my avdl files from src/main/avro and compil= es > it to the build directory. > > But, generate-sources ( command line or eclipse ) dosent seem to triger i= t. > Am I missing something in the plugin configuration to integrate this into > the generate-sources step. > Also, what are the various config values ( if i want to change the defaul= t > source, target directories etc ). I cant seem to find any docs on it. > > > > > org.apache.avro > > avro-maven-plugin > > 1.5.1 > > > > I have the m2eclipse plugin too. > > On Wed, May 25, 2011 at 4:44 PM, Scott Carey wro= te: > >> generate-sources in Eclipse works for me. (Helios, m2Eclipse plugin). >> >> Sometimes, I have to right click on a project and select "Maven > Update >> Project Configuration" to get it to generate the sources. It doesn't >> automatically run generate-sources if you change a schema file, but a >> project clean will trigger it for me. >> >> >> >> On 5/25/11 2:54 PM, "Yang" wrote: >> >> >it seems that eclipse can't run the generate-sources phase, so that I >> >have to >> >do 'mvn generate-sources" outside of eclipse, and then import the >> >sources from eclipse. >> > >> >is there a better way to integrate with eclipse? >> > >> >Thanks >> >Yang >> >> > --001636b14cb0b00f3804a5b60480 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Thanks James and Scott. Got it working. But, had to explicitly specify all = the paths just like in James's config example even though I am followin= g the default locations.=A0

On Tue, Jun 1= 4, 2011 at 12:32 PM, Scott Carey <scott@richrelevance.com> wrote:

To configure the source= and destination directories, it looks something like:
=A0= =A0 =A0 =A0<plugin>
=A0=A0 =A0 =A0 =A0<groupId>org.apache.avr= o</groupId>
=A0=A0 =A0 =A0 =A0<artifactId>avro-maven-= plugin</artifactId>
=A0=A0 =A0 =A0 =A0<version>1.5.1&= lt;/version>
=A0=A0 =A0 =A0 =A0<executions>
=A0=A0 =A0 =A0 =A0 =A0<ex= ecution>
=A0=A0 =A0 =A0 =A0 =A0 =A0<id>schemas</id>= ;
=A0=A0 =A0 =A0 =A0 =A0 =A0<phase>generate-sources</pha= se>
=A0=A0 =A0 =A0 =A0 =A0 =A0<goals>
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0<goal>schema</goal>
=A0=A0 =A0 =A0 =A0 =A0 =A0</goals>
=A0=A0 =A0 =A0 =A0 =A0= =A0<configuration>
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0<sourc= eDirectory>src/main/schemata/avro</sourceDirectory>
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0<outputDirectory>target/generated-= sources/avro</outputDirectory>
=A0=A0 =A0 =A0 =A0 =A0 =A0&l= t;/configuration>
=A0=A0 =A0 =A0 =A0 =A0</execution>
=A0=A0 =A0 =A0 =A0</executions>
=A0=A0 =A0 =A0</plugin>

(which do= es only *.avsc via the schema goal)


Covers the Avro build, and similar works for me in othe= r projects.

In particular, it seems as though one = must do the "Maven > Update Project Configuration" step on a m= aven project to get it to add source directories generated by plugins.

I usually do "Import =85. =A0 Existing Maven Proje= ct" =A0Followed immediately by "Maven > Update Project Configu= ration" on the project.


On 6/14/11 11:46 AM, "Ar= un Ramakrishnan" <sinchronized.arun@gmail.com> wrote:

From the command line
"mvn avro:idl-pro= tocol" finds my avdl files from src/main/avro and compiles it to the b= uild directory.

But, generate-sources ( command line or eclipse ) dosen= t seem to triger it. Am I missing something in the plugin configuration to = integrate this into the generate-sources step.
Also, what are the= various config values ( if i want to change the default source, target dir= ectories etc ). I cant seem to find any docs on it.


<plugin>

<= span><groupId>org.apache.avro&= lt;/groupId>

<artifactId>avro-maven-plugin</artifactId>

<version>1.5.1</= version>

</plugin>


I have the m2eclipse plugin too.=A0

On Wed, May 25, 2011 at 4:44 PM, Scott Carey <scott= @richrelevance.com> wrote:
generate-sources in Eclipse works for me. = =A0(Helios, m2Eclipse plugin).

Sometimes, I have to right click on a project and select "Maven > U= pdate
Project Configuration" to get it to generate the sources. =A0It doesn&= #39;t
automatically run generate-sources if you change a schema file, but a
project clean will trigger it for me.



On 5/25/11 2:54 PM, "Yang" <teddyyyy123@gmail.com> wrote:

>it seems that eclipse can't run the generate-sources phase, so that= I
>have to
>do 'mvn generate-sources" outside of eclipse, and then import = the
>sources from eclipse.
>
>is there a better way to integrate with eclipse?
>
>Thanks
>Yang



--001636b14cb0b00f3804a5b60480--