In master we use protobuf-maven-plugin to run protoc. The plugin will
download protoc binary from the maven repo so you do not need to install
protoc on your machine manually.

So you can just install pb 2.5 on your machine.

For the general question that how to have 2 protobuf versions on one
machine, I think you need to build protoc from source and install it
manually, and use symbol link to select the prefered version before you run
mvn command.

Thanks.

2016-12-09 16:00 GMT+08:00 Stephen Jiang <[email protected]>:

> master branch is in protobuf version 3.1; branch-1.1 is in protobuf version
> 2.5
>
> I upgraded to version 3.1 in my machine so that I can work on master
> branch; now I need to run the protobuf to generate file in branch-1.1 and
> get the error:
>
> *[ERROR] Failed to execute goal
> org.apache.hadoop:hadoop-maven-plugins:2.5.1:protoc (compile-protoc) on
> project hbase-protocol: org.apache.maven.plugin.MojoExecutionException:
> protoc version is 'libprotoc 3.1.0', expected version is '2.5.0' -> [Help
> 1]*
>
> Is there a easy way to have 2 protobuf version side-by-side and specify in
> mvn command?
>
> Thanks
> Stephen
>

Reply via email to