avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Carey <scottca...@apache.org>
Subject Re: Importing in avdl from classpath of project
Date Wed, 07 Dec 2011 18:50:15 GMT
I think that at minimum, it would be useful to have an option to 'also look
in the classpath' in the maven plugin, and have the option to do so in
general with the IDL compiler.   I would gladly review the patch in a JIRA.


On 12/7/11 10:13 AM, "Chau, Victor" <victor@x.com> wrote:

> Hello,
> I am trying to address a shortcoming of the way that the import feature works
> in IDL.  Currently, it looks like the only option is to place the file being
> imported inside the same directory as that of the importing avdl.
> In our setup, we have avdl¹s that are spread among several maven projects that
> are owned by different teams.  I would like to be able to just create a
> dependency on another jar that contains the avdl I am want to import and have
> Avro be smart enough to look for it in the classpath of the project containing
> the avdl.
> The main problem is to make all of this work with the avro-maven-plugin.  The
> plugin¹s runtime classpath is not the same as that of the maven project¹s
> classpath.  Through the magic of Stackoverflow, I figured out how to get the
> project¹s classpath and construct a new classloader and pass it to the Idl
> compiler for it to lookup the file if it is not available in the local
> directory.  
> Is this a feature that people think would be useful?  Essentially, the IDL
> syntax would not change but the behavior is:
> 1.       If imported file is available locally (in the current input path),
> use it
> 2.       Else look for it on the project¹s classpath.
> If so, I have a working patch that needs some cleanup but I can submit it as a
> feature request in JIRA.

View raw message