The jprotobuf-precompile-plugin allows you to pre-compile Protobuf metadata, which speeds up application startup. Configure the filterClassPackage to specify the package to scan for pre-compilation.
Run the plugin using mvn jprotobuf:precompile or simply mvn package.
<plugin>
<groupId>com.baidu</groupId>
<artifactId>jprotobuf-precompile-plugin</artifactId>
<version>1.2.8</version>
<configuration>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
<filterClassPackage>com.baidu</filterClassPackage>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>precompile</goal>
</goals>
</execution>
</executions>
</plugin>