Avro
  1. Avro
  2. AVRO-572

Create a Maven plugin goal and Ant task to generate an avpr file from a avdl file

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: java
    • Labels:
      None

      Description

      Avro currently can generate Java source from an an AvroIDL file (*.avdl) but can not generate an avro protocol file from an avdl. This is a request to create build system tools for this process.

        Issue Links

          Activity

          Hide
          Doug Cutting added a comment -

          Do you mean an Ant task? If not, we probably need one of those too.

          Show
          Doug Cutting added a comment - Do you mean an Ant task? If not, we probably need one of those too.
          Hide
          Patrick Hunt added a comment -

          I think this is a dup of AVRO-159 - I've already submitted a patch there, but it needs to be integrated into the build system (see the comments on that jira)

          Show
          Patrick Hunt added a comment - I think this is a dup of AVRO-159 - I've already submitted a patch there, but it needs to be integrated into the build system (see the comments on that jira)
          Hide
          Jeff Hammerbacher added a comment -

          Hey Patrick,

          It depends on the scope of AVRO-159, as there are two stages where plugins are needed: first, to go from Avro IDL to .avpr or .avsc, and second, when using code generation, to generate code from the .avpr and .avsc files. I believe your tasks at AVRO-159 only covered the latter stage, but if you intend to cover the former as well, more power to you.

          We should probably, as Doug notes, have tasks for both Ant and Maven, though I think Maven can just use Ant tasks.

          Later,
          Jeff

          Show
          Jeff Hammerbacher added a comment - Hey Patrick, It depends on the scope of AVRO-159 , as there are two stages where plugins are needed: first, to go from Avro IDL to .avpr or .avsc, and second, when using code generation, to generate code from the .avpr and .avsc files. I believe your tasks at AVRO-159 only covered the latter stage, but if you intend to cover the former as well, more power to you. We should probably, as Doug notes, have tasks for both Ant and Maven, though I think Maven can just use Ant tasks. Later, Jeff
          Hide
          Scott Carey added a comment -

          Not fixed as part of AVRO-159 and AVRO-647. AVRO-647 added a maven plugin for compiling directly from avdl to java with no intermediate avpr or avsc.

          Show
          Scott Carey added a comment - Not fixed as part of AVRO-159 and AVRO-647 . AVRO-647 added a maven plugin for compiling directly from avdl to java with no intermediate avpr or avsc.
          Hide
          Jeff Hammerbacher added a comment -

          Hey Scott,

          You mention that AVRO-647 added a plugin for compiling directly from avdl to java; where can I find documentation on how to use this plugin?

          Thanks,
          Jeff

          Show
          Jeff Hammerbacher added a comment - Hey Scott, You mention that AVRO-647 added a plugin for compiling directly from avdl to java; where can I find documentation on how to use this plugin? Thanks, Jeff
          Hide
          Scott Carey added a comment -

          Documentation will be addressed as part of AVRO-714.

          Currently, the best documentation is the trunk build process and the source code.

          http://svn.apache.org/viewvc/avro/trunk/lang/java/ipc/pom.xml?view=markup

          is an example usage, and the source:

          http://svn.apache.org/viewvc/avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/IDLProtocolMojo.java?view=markup&revision=1049734

          Show
          Scott Carey added a comment - Documentation will be addressed as part of AVRO-714 . Currently, the best documentation is the trunk build process and the source code. http://svn.apache.org/viewvc/avro/trunk/lang/java/ipc/pom.xml?view=markup is an example usage, and the source: http://svn.apache.org/viewvc/avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/IDLProtocolMojo.java?view=markup&revision=1049734
          Hide
          Jeff Hammerbacher added a comment -

          Cool, thanks. Will we publish some jars to the Avro 1.4.1 repositories for compiling with Maven, by any chance, or will we need to wait until 1.5.0 to use this goodness?

          Show
          Jeff Hammerbacher added a comment - Cool, thanks. Will we publish some jars to the Avro 1.4.1 repositories for compiling with Maven, by any chance, or will we need to wait until 1.5.0 to use this goodness?
          Hide
          Scott Carey added a comment -

          There are no current plans to back-port it, although I think the source of the current avro-maven-plugin would be compatible with 1.4.1 so it would mostly be a matter of packaging and tweaking the 1.4.x ant build to produce a separate artifact with those 4 classes and the appropriate pom.xml. Its not much code, but it does have to be its own jar file.

          Show
          Scott Carey added a comment - There are no current plans to back-port it, although I think the source of the current avro-maven-plugin would be compatible with 1.4.1 so it would mostly be a matter of packaging and tweaking the 1.4.x ant build to produce a separate artifact with those 4 classes and the appropriate pom.xml. Its not much code, but it does have to be its own jar file.

            People

            • Assignee:
              Unassigned
              Reporter:
              Jeff Hammerbacher
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development