[rules-dev] Fwd: How to work with Protobuf (.proto) files

Edson Tirelli ed.tirelli at gmail.com
Thu Oct 25 13:23:47 EDT 2012


   All, re-sending this e-mail. Anyone touching .proto files please make
sure you follow the instructions bellow to install the protobuf plugin. I
will add that to a wiki page.

   Edson

---------- Forwarded message ----------
From: Edson Tirelli <ed.tirelli at gmail.com>
Date: Wed, Mar 21, 2012 at 12:30 PM
Subject: How to work with Protobuf (.proto) files
To: Rules Dev List <rules-dev at lists.jboss.org>



   All,

   As we started using Protobuf, it is important to know how you make
changes to .proto files and how to compile them. Easiest way:

1. Download protobuf compiler from:
http://code.google.com/p/protobuf/downloads/list

2. Install protobuf-dt eclipse plugin as detailed here:
http://code.google.com/p/protobuf-dt/

3. Configure the destination directory to generate the java files as
detailed in step 2 here:

http://code.google.com/p/protobuf-dt/wiki/IntegrationWithProtoc

Set the "Java Output Directory" to: src/main/java

4. VERY IMPORTANT FOR JBPM: jBPM Flow project has a .proto file that
extends the data types defined in the .proto file in Drools Core, so you
need to configure the protobuf import path as detailed here:

http://code.google.com/p/protobuf-dt/wiki/ImportPaths

Add the following import paths to the jbpm-flow project:

${your drools-core project in eclipse}/src/main/resources
${your_drools_flow_project}/src/main/resources

   After doing that, when you edit and save the .proto files, eclipse will
automatically compile and regenerate the java source code for them.

   Edson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20121025/38efe900/attachment.html 


More information about the rules-dev mailing list