I get this error while I compile hadoop source code with maven.
I am using windows 8.1, hadoop 2.7.2 and visual studio 2012.
I followed this link Maven MojoExecutionException but it didnt work.
For installing hadoop I use http://harishshan.blogspot.com/2014/10/install-hadoop-251-on-windows-7-64bit.html.
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.7.2:prot
oc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecut
ionException: 'protoc --version' did not return a version -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :hadoop-common
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.
Related
Hi I got the below error while doing maven build for Carbon API management wso2 repo. I ran npm install already
[ERROR] Failed to execute goal
org.codehaus.mojo:exec-maven-plugin:1.5.0:exec (npm install
(initialize)) on project org.wso2.carbon.apimgt.publisher.feature:
Command execution failed.: Cannot run program "C:\Program
Files\nodejs\npm" (in directory
"C:\projects\carbon-api\carbon-apimgt\features\apimgt\org.wso2.carbon.apimgt.publisher.feature\src\main\resources\publisher-new"):
CreateProcess error=193, %1 is not a valid Win32 application -> [Help
1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run
Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to
enable full debug logging. [ERROR] [ERROR] For more information about
the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] [ERROR] After correcting the problems, you can resume the
build with the command [ERROR] mvn -rf
:org.wso2.carbon.apimgt.publisher.feature
I ran node related commands separately and removed node commands from appropriate pom.xml. Now the build is success
I'm getting build error when trying to build a clean version of latest Spark. I did the following
1) git clone https://github.com/apache/spark.git
2) build mvn -DskipTests clean package
But I get the following error:
Spark Project Parent POM .......................... FAILURE [2.338s]
...
BUILD FAILURE ...
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-enforcer-plugin:1.4:enforce
(enforce-versions) on project spark-parent_2.10: Some Enforcer rules
have failed. Look above for specific messages explaining why the rule
failed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I'm running Lubuntu 14.04 with the following:
java version "1.7.0_91"
OpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
Apache Maven 3.0.5
Updating Maven version to 3.3.9 solved the issue
I'm trying to run Sonar analysis via Maven, but it continually complains:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project mio-commons: Another SonarQube analysis is already in progress for this project -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
There is no analysis for this project in progress, and I've even tried deleting the project itself from Sonar. Any ideas what the issue might be?
I solved it, I guess, deleting ${basedir}/.sonar folder.
For me, deleting ${projectDir}/.scannerwork fixed the problem.
Command on linux:
$ <your project directory>
$ rm -rf .scannerwork
I am using sonarqube version 7.0 and sonar-scanner version 3.0.3.778
The cache directory is displayed in the console logs. Deleting that worked for me.
For me, it was under
C:\Users\<username>\.sonar\cache
I'm using Maven 3.2.3 on Mac 10.9.5 (Java 6) with bash shell. Per the accepted answer on this thread -- How do I exclude certain modules from a maven build using the commandline, I'm trying to run a Maven build on my multi-module project while excluding some modules from teh build, so I have crafted this command
davea$ mvn clean install -pl org.mainco.subco:subco,org.mainco.subco:database,org.mainco.subco:mainmodule,org.mainco.subco:moduleB,org.mainco.subco:moduleD,org.mainco.subco:moduleC,\!org.mainco.subco:moduleF -DskipTests
However, something about the ā!ā syntax is failing because I get the error
[ERROR] Could not find the selected project in the reactor: org.mainco.subco:moduleF -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
The error is complaining about the very module I want to exclude. What is the proper command line syntax? (Note: Iām not interested in editing my parent pom.xml file, this question is strictly concerned with excluding modules via the command line).
I follow this instructions at Sakai Development Environment Setup Walkthrough.
I used 2.9.x Sakai version.
At step 11-C :
Execute mvn -Pcafe clean install to build the minimal version (cafe)
of Sakai using maven.
I have an error :
[ERROR] Failed to execute goal on project kernel-deploy: Could not resolve depen
dencies for project org.sakaiproject:kernel-deploy:pom:2.9-SNAPSHOT: Could not f
ind artifact org.sakaiproject.entitybroker:entitybroker-assembly:zip:tomcat-over
lay:1.5.4-SNAPSHOT in sakai-maven2-snapshots (http://source.sakaiproject.org/mav
en2-snapshots) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :kernel-deploy
And I tried mvn clean install it gave me error.
Please Help to solve it .
The 'cafe' build profile of Sakai is no longer maintained. Just do a full build. When you have built everything then you can build individual modules that you modify and it will be quick.
The startup time of Sakai is now under 30 seconds so the cafe build doesn't really give much anymore (it used to when processors were slower, the build took an hour and the startup would take several minutes :)