MojoExecution exception MojoExecution exception hadoop hadoop

MojoExecution exception


The exception is not related to Maven. The error message is actually already pointing at the main issue:

[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.7.2:protoc \(compile-protoc) on project hadoop-common: \org.apache.maven.plugin.MojoExecutionException: \'protoc --version' did not return a version -> [Help 1]

The protoc goal of the org.apache.hadoop:hadoop-maven-plugins Maven Plugin is checking whether the protoc command is available in the PATH, checking the simplest common command: the version command:

protoc --version

Looking at the tutorial you linked you most probably missed Step 4:

Step 4: Install Protocol buffer 2.5.0

Or you probably didn't configure it properly, not making it available via the command PATH.


Update
The tutorial indeed doesn't provide much information about from where and how to install Protocol Buffer.

The version described by the tutorial is 2.5.0, available here. You can download the Windows zip here. Then simply unzip it and add its path to the Windows PATH: before checking whether the Maven build will then recognize it, first check whether the protoc --version would fine or not from any command line.


Also note: comments to the tutorial point to other errors as well, double check them in case you still encounter other errors in the overall process.