Chau, Victor 2011-12-07, 18:13
-Re: Importing in avdl from classpath of project
Scott Carey 2011-12-07, 18:50
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" <[EMAIL PROTECTED]> wrote:
> 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
> 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.
Chau, Victor 2011-12-08, 00:33