Skip to content

jreece1567/MyProtocPlugin

Repository files navigation

MyProtocPlugin

Overview

This is a very simple demo of a Protocol Buffer Compiler (protoc) plugin written in Java. The demo processes one or more .proto files as provided by protoc, and generates JSON representing the enums and messages defined there.

Building

This is a standard Maven project - mvn clean package will build the demo as a shaded JAR.

Scripts and sample .proto

There are two shell scripts in this project.

plugin_wrapper.sh

This script wraps up the invocation of the plugin-JAR file so that it can be executed by protoc.

runprotoc.sh

This script runs the protoc compiler, using the demo plugin.

A sample hello.proto file is provided.

Running

When the runprotoc.sh script is executed, it will run protoc, which will invoke the plugin, which will write a JSON file to the project's ./output folder.

Prerequisites

The protoc compiler must be installed and available on your PATH

Download the protoc binary, if necessary:
See the Protobuf Releases page.
The protoc version used in this demo can be downloaded here.

Frameworks

The following Java packages are used:


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published