Maven Protocol Buffers (protoc) Plugin that calls the protocol buffers compiler.
Pull request Compare This branch is 13 commits ahead, 1 commit behind dtrott:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Changes by binkley from dtrott:

* Include target/classes as a proto path to aid test protos which include production protos.
* Support --descriptor_set_out and --include_imports options to protoc.
* Binary descriptor set writes to ${}/generated-resources/protoc and ${}/generated-test-resources/protoc.
* The default descriptor set file name is ${project.artifactId}-${project.version}.proto.bin.
* Change the descriptor set file name with <descriptorSetOut>...</descriptorSetOut>.
* For the project to include the generated resources, the descriptor set file name must end with .proto.bin.  Please contact me if this is overly onerous.
* Enable --include_imports with <includeImports/>.
* Print protoc command line with <verbose>true</verbose>.
* Maven repo at (instruction there).


*** Maven Protocol Buffers (protoc) Plugin ***

A minimal configuration to invoke this plugin would be:

<project xmlns="" xmlns:xsi=""



You must:
+ Use Java 1.5 or newer due to the usage of Generics
+ Either ensure the "protoc" executable is in your PATH or set the
  <protocExecutable> parameter to the correct location.
+ Define the executions you want (you probably don't need the testCompile
  unless you have custom protocol buffer objects in your tests.
+ Include the dependency on protobuf-java or your compile will fail.

Once this is all done add your *.protoc files to the directory: src/main/proto

Everything should then build with a: mvn clean install

You may also need to add the following to your settings.xml to download the


Normally this plug-in executes the protoc compilation on every execution
this can be overriden by setting:

If you build on NFS you may also need the following setting: