3

How to integrate protocol buffers with a maven project ? Couldn't find any information for maven users on the protocol buffers page. I need to add PB support to my web app project with protoc compiler support as well for maven, if it is there.

Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
  • 1
    Is this covered by http://stackoverflow.com/questions/1578456/integrate-protocol-buffers-into-maven2-build ? – Marc Gravell Oct 02 '11 at 10:25
  • Thanks Marc! this helps .. i chose this snippet to integrate with PB: http://stackoverflow.com/questions/1578456/integrate-protocol-buffers-into-maven2-build/3007010#3007010 just a question.. how do i specify the location of protoc compiler here as my buld fails saying it cant locate protoc. is that provided by the protobuf 2.4.1 jar that is added by adding a dependency or do I need to keep it separately in my code ? where is it located if it is there ? thanks! – Rajat Gupta Oct 02 '11 at 18:42
  • cool no problem.. i just supplied it manually and it works.. will there be any issue if i change versions of protobuf but not the protoc, if you can tell ? – Rajat Gupta Oct 02 '11 at 19:46
  • 1
    You either make sure the PATH includes the dir containing protoc, or you can specify the location in the pom.xml - search for `` on [this page](https://github.com/dtrott/maven-protoc-plugin) for an example. – jon hanson Oct 10 '11 at 20:53

0 Answers0