So Java users don't like relying on C++ code in their build process. On the
other hand, most C++ users would not accept Java in their build process
either. But if we wrote the C++ code generator in C++ and the Java code
generator in Java, then we'd need to write and maintain a .proto parser in
both languages as well. A correct parser that supports all features (e.g.
custom options) is a large, complicated piece of code, and maintaining two
separate implementations of it would be a huge pain.
This seems to leave no options that please everyone. :/
On Sat, Sep 19, 2009 at 8:33 AM, Holger Hoffstaette <
> If I may..
> On Fri, 18 Sep 2009 23:16:03 -0700, Kenton Varda wrote:
> > Regarding maven plugins -- why can't the plugin just invoke protoc using
> > Runtime.exec()? What's the benefit of having the code generator running
> > inside the Maven process? Honest question -- I don't know very much
> > Maven.
> Any reliance on external binaries is a complete PITA because it makes the
> entire project unportable and reliant on the platform-local installation.
> In the real world (outside the big G ;) people actually do use Windows,
> OSX and different flavours of Linux all in one project; hardcoding
> executable paths into the POM is just not practical. Another aspect is
> reliable configuration/argument passing and error control.
> The general benefit of having protoc properly integrated into maven is
> that it perfectly fits into the overall model of build phases, one of
> which just happens to be code generation.
> There are no reasons why a protoc-plugin could not bundle statically
> linked protoc executables for a variety of platforms inside the jar and
> then extract them to (say) /tmp before starting..except maybe for the
> overall fragility of such an approach. Same for an ant task; in fact they
> both could probably share the same common launcher code.
> Now all we need to do is to find someone to write it :)
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to email@example.com
To unsubscribe from this group, send email to
For more options, visit this group at