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 about
> 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 protobuf@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to