I am trying to build some preexisting Java code which includes google protocol buffers in its transport layer. The plugin I am using I have included in my pom file with the following element:
<plugin>
<groupId>com.github.igor-petruk.protobuf</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.3</version>
<executions>
<execution>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
I have installed protobuf version 2.4.1 and protoc is available over the command line, and the version of protobuf-java I am including in my pom is also 2.4.1 from the com.google.protobuf group. I must use this tech stack as I am working with an existing codebase as I previously mentioned, but despite the fact that there is a newer version of protobufs out this is not the problem I am experiencing.
The problem is that the generated code from the protoc binary (invoked by the above mentioned maven plugin) does not implement an abstract function from a parent class defined in the protobuf library imported into my project from maven. Here is the error:
[ERROR] <generated java class from protoc> is not abstract and does not override abstract method getParserForType() in com.google.protobuf.MessageLite
My assumption is that there is some configuration error with the protobuf library, and that this function getParserForType exists in one of the libraries but not the other.