Here are few steps to configure protobuf-to-java compilation in your maven project:

Install google protobuf compiler on your computer.

    <!-- You may need to specify path to protobuf compiler -->



Create protobuf definition files within /src/main/protobuf/ directory. You may want to specify the following options in .proto files.

package com.example;
option java_multiple_files = true;
option java_outer_classname = "Messages";

mvn generate-sources and you’re done!