<div><br></div>   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.<div><br></div><div>   Edson<br>
<br><div class="gmail_quote">---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">Edson Tirelli</b> <span dir="ltr">&lt;<a href="mailto:ed.tirelli@gmail.com" target="_blank">ed.tirelli@gmail.com</a>&gt;</span><br>
Date: Wed, Mar 21, 2012 at 12:30 PM<br>Subject: How to work with Protobuf (.proto) files<br>To: Rules Dev List &lt;<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>&gt;<br><br><br><div>

<br></div>   All,<div>
<br></div><div>   As we started using Protobuf, it is important to know how you make changes to .proto files and how to compile them. Easiest way:</div><div><br></div><div>1. Download protobuf compiler from: <a href="http://code.google.com/p/protobuf/downloads/list" target="_blank">http://code.google.com/p/protobuf/downloads/list</a></div>



<div><br></div><div>2. Install protobuf-dt eclipse plugin as detailed here: <a href="http://code.google.com/p/protobuf-dt/" target="_blank">http://code.google.com/p/protobuf-dt/</a></div><div><br></div><div>3. Configure the destination directory to generate the java files as detailed in step 2 here:</div>



<div><br></div><div><a href="http://code.google.com/p/protobuf-dt/wiki/IntegrationWithProtoc" target="_blank">http://code.google.com/p/protobuf-dt/wiki/IntegrationWithProtoc</a><br></div><div><br></div><div>Set the &quot;Java Output Directory&quot; to: src/main/java</div>



<div><br></div><div>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:</div>



<div><br></div><div><a href="http://code.google.com/p/protobuf-dt/wiki/ImportPaths" target="_blank">http://code.google.com/p/protobuf-dt/wiki/ImportPaths</a></div><div><br></div><div>Add the following import paths to the jbpm-flow project:</div>



<div><br></div><div>${your drools-core project in eclipse}/src/main/resources</div><div>${your_drools_flow_project}/src/main/resources</div><div><br></div><div>   After doing that, when you edit and save the .proto files, eclipse will automatically compile and regenerate the java source code for them.</div>


<span><font color="#888888">
<div><br></div><div>   Edson</div><div> </div><div><div><br></div></div></font></span></div>
</div>