title: Dependencies for Protoc Java plugin?
body: <p>I'm trying to make working example at <a href="https://stackoverflow.com/questions/41432876/how-to-write-a-custom-protobuf-codegenerator-in-java">How to write a custom Protobuf CodeGenerator in Java</a> . When I try to compile a file with</p>
  
  <pre><code>import com.google.protobuf.compiler.PluginProtos;
  
  import java.io.IOException;
  
  public class MyPlugin {
      public static void main(String[] args) throws IOException {
          CodeGenerator gen = new CodeGenerator();
          PluginProtos.CodeGeneratorRequest codeGeneratorRequest = PluginProtos.CodeGeneratorRequest.parseFrom(System.in);
          codeGeneratorRequest.getProtoFileList().forEach(gen::handleFile);
          // get the response and do something with it
          //PluginProtos.CodeGeneratorResponse response = PluginProtos.CodeGeneratorResponse.newBuilder().build();
          //response.writeTo(System.out);
      }
  }
  </code></pre>
  
  <p>I get compile error because CodeGenerator is unknown. I have in my pom.xml Maven file the following inside "dependencies" tag -</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.google.protobuf&lt;/groupId&gt;
      &lt;artifactId&gt;protobuf-java&lt;/artifactId&gt;
      &lt;version&gt;3.6.1&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>What else do I need to add to dependencies make my plugin working? I plan to use Java API from <a href="https://developers.google.com/protocol-buffers/docs/reference/java/" rel="nofollow noreferrer">https://developers.google.com/protocol-buffers/docs/reference/java/</a> .</p>