[rules-dev] Upgrade to protobuf 2.5 (and how to work with Protobuf)

Edson Tirelli ed.tirelli at gmail.com
Mon Mar 25 14:16:16 EDT 2013


   All,

   Today protobuf used by Drools/jBPM was upgrade to version 2.5.0. If you
only use the marshalling code, you don't need to do anything. Maven should
automatically download the new version and use it.

   If you do protobuf development and need to re-generate the protobuf
classes from time to time, here is a reminder of how to configure your
environment. Please note that the configuration of the plugin (specially
for the jBPM module) is extremely important, or you will start to have all
kinds of errors and will not know why.

1. Download and install 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



  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20130325/bd666088/attachment.html 


More information about the rules-dev mailing list