avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun Ramakrishnan <sinchronized.a...@gmail.com>
Subject Re: avro-maven-plugin in eclipse?
Date Wed, 15 Jun 2011 01:24:47 GMT
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 the
default locations.

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

>
> To configure the source and destination directories, it looks something
> like:
>       <plugin>
>         <groupId>org.apache.avro</groupId>
>         <artifactId>avro-maven-plugin</artifactId>
>         <version>1.5.1</version>
>         <executions>
>           <execution>
>             <id>schemas</id>
>             <phase>generate-sources</phase>
>             <goals>
>               <goal>schema</goal>
>             </goals>
>             <configuration>
>               <sourceDirectory>src/main/schemata/avro</sourceDirectory>
>
>  <outputDirectory>target/generated-sources/avro</outputDirectory>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
>
> (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 directories
> generated by plugins.
>
> I usually do "Import ….   Existing Maven Project"  Followed immediately by
> "Maven > Update Project Configuration" on the project.
>
>
>
> On 6/14/11 11:46 AM, "Arun Ramakrishnan" <sinchronized.arun@gmail.com>
> wrote:
>
> From the command line
> "mvn avro:idl-protocol" finds my avdl files from src/main/avro and compiles
> it to the build directory.
>
> But, generate-sources ( command line or eclipse ) dosent 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 directories etc ). I cant seem to find any docs on it.
>
>
>   <plugin>
>
>   <groupId>org.apache.avro</groupId>
>
>   <artifactId>avro-maven-plugin</artifactId>
>
>   <version>1.5.1</version>
>
>   </plugin>
>
> I have the m2eclipse plugin too.
>
> On Wed, May 25, 2011 at 4:44 PM, Scott Carey <scott@richrelevance.com>wrote:
>
>> 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" <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
>>
>>
>

Mime
View raw message