hadoop 2.3.0 source build error - java

I am trying to build hadoop.2.3.0.
issued the following command:
mvn package -Pdist,native -DskipTests -Dtar
getting the following errors.
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.124s
[INFO] Finished at: Sun Jun 22 23:49:21 CDT 2014
[INFO] Final Memory: 27M/218M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run
(create-testdirs) on project hadoop-project: Error executing ant tasks: /work/srchadoop/hadoop-2.3.0-src/hadoop-project/target/antrun/build-main.xml (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (create-testdirs) on project hadoop-project: Error executing ant tasks: /work/srchadoop/hadoop-2.3.0-src/hadoop-project/target/antrun/build-main.xml (No such file or directory)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks: /work/srchadoop/hadoop-2.3.0-src/hadoop-project/target/antrun/build-main.xml (No such file or directory)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:360)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.io.FileNotFoundException: /work/srchadoop/hadoop-2.3.0-src/hadoop-project/target/antrun/build-main.xml (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
at java.io.FileOutputStream.<init>(FileOutputStream.java:99)
at org.codehaus.plexus.util.FileUtils.fileWrite(FileUtils.java:470)
at org.apache.maven.plugin.antrun.AntRunMojo.writeTargetToProjectFile(AntRunMojo.java:608)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:263)
... 21 more
[ERROR]
[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 error occurred due to the permissions of folder in which the code was residing. I ran the command with sudo and error was resolved, I was able to build with out any issues.
sudo mvn package -Pdist,native -DskipTests -Dtar

I think its a permission issue, This worked for me. And make sure you have the correct LD_LIBRARY_PATH.
sudo chown -R username parent-directory
username -> eg: ubuntu)
parent-directory -> hadoop source directory
And then run
mvn package -Pdist,native -DskipTests -Dtar

Related

Hadoop 2.6.0 Maven Compilation Error on hadoop-yarn-server-nodemanager

I am running into a particular error I haven't seen around on the internet
when compiling hadoop from source.
It seems to be a problem with some missing java packages the error occurs
when trying to compile hadoop-yarn-server-nodemanager
Looks like some java packages are missing or were not gotten by maven.
The build log of everything after the error ocurred is on this gist: https://gist.github.com/grplyler/46025ba50664260fee75
Here is the command I used to compile and package hadoop on the
root of its source:
mvn package -Pdist,native -DskipTest -Dtar -X
My system and environment details:
OS: Linux Mint 17 (Ubuntu 14.10)
Java: java version "1.7.0_75"
Protobuf: 2.5.0
Maven: 3.0.5
Hadoop: 2.6.0
Also installed so I can build the native code (because i want the fuse-dfs part) are:
cmake
zlib
zlib1g-dev
libcurl4-openssl-dev
A similar problem is detailed in this question But it was cause by windows maximum path lengths which is not my case here.
I have been working on this for 2 days now, any feedback or advice as to a solution to the problem would be much appreciated.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project hadoop-yarn-server-nodemanager: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:729)
at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:161)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[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/MojoFailureException
I would try and update to the newest version of maven(which is no longer picked up by apt-get)
sudo apt-get remove maven
sudo apt-get install gdebi
wget http://ppa.launchpad.net/natecarlson/maven3/ubuntu/pool/main/m/maven3/maven3_3.2.1-0~ppa1_all.deb
sudo gdebi maven3_3.2.1-0~ppa1_all.deb
sudo ln -s /usr/share/maven3/bin/mvn /usr/bin/maven

Hazeltask: MojoExecutionException while signing artifact with maven-gpg-plugin

I'm trying to build Hazeltask on my local with mvn clean install. How to fix the next error:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Hazeltask Parent POM .............................. FAILURE [0.385s]
[INFO] Hazeltask ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.490s
[INFO] Finished at: Sat Mar 21 12:25:19 EET 2015
[INFO] Final Memory: 3M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project hazeltask-parent: Exit code: 2 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project hazeltask-parent: Exit code: 2
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Exit code: 2
at org.apache.maven.plugin.gpg.GpgSigner.generateSignatureForFile(GpgSigner.java:167)
at org.apache.maven.plugin.gpg.AbstractGpgSigner.generateSignatureForArtifact(AbstractGpgSigner.java:205)
at org.apache.maven.plugin.gpg.GpgSignAttachedMojo.execute(GpgSignAttachedMojo.java:176)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[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
If not already done run the gpg-agent daemon
gpg-agent --daemon
If you don't have one, generate a key pair:
gpg --gen-key
Then clone the repository
git clone https://github.com/jclawson/hazeltask.git
and run the build (your passphrase will be asked)
mvn clean install

opennlp install - no suitable method found for train

Hello I am trying to install opennlp on ubuntu. I have installed java 7, svn and maven 3.0.4. I have checked out the opennlp-trunk project based on the instructions on http://opennlp.apache.org/source-code.html.
svn co https://svn.apache.org/repos/asf/opennlp/trunk/
Now I go into trunk/opennlp and run the install command
mvn clean install
and I get this error
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:17.074s
[INFO] Finished at: Wed Feb 05 16:46:08 EST 2014
[INFO] Final Memory: 34M/113M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project opennlp-uima: Compilation failure: Compilation failure:
[ERROR] /home/ssriparasa-nlp/trunk/opennlp-uima/src/main/java/opennlp/uima/chunker/ChunkerTrainer.java:[206,41] error: no suitable method found for train(String,ObjectStream<ChunkSample>,int,int)
[ERROR] /home/ssriparasa-nlp/trunk/opennlp-uima/src/main/java/opennlp/uima/sentdetect/SentenceDetectorTrainer.java:[170,43] error: cannot find symbol
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project opennlp-uima: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Yep, the trunk is currently officially broken. The Apache Jenkins confirms the build failure. The OpenNLP developers have been notified.
Disclosure: I am an Apache committer (not on OpenNLP though).
Build should be back to normal.
https://builds.apache.org/job/OpenNLP/454/console

AD authentication java class for Fitnesse

How can I create ldap-authentation-${version}.jar file described here?
https://github.com/timander/fitnesse-ldap-authenticator
I am so lost.
I am trying to enable Active Directory authentication for Fitnesse test.
Any help is appreciated.
Thanks,
Ali
Ok Tim I attempted it and now I am running in some issues. First build failure issue was solved after changing the version in pom.xml from 20100303 to 20131110. Now the second build is failing because of this:
"
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project fitnesse-ldap-authenticator: Compilation failure: Compilation failure:
[ERROR] c:\Users\araza\Documents\GitHub\fitnesse-ldap-authenticator\src\main\java\fitnesse\authentication\LDAPAuthenticator.java:[26,16] error: isAuthenticated(String,String) in LDAPAuthenticator cannot override isAuthenticated(String,String) in Authenticator
[ERROR]
[ERROR] could not parse error message: overridden method does not throw Exception
[ERROR] c:\Users\araza\Documents\GitHub\fitnesse-ldap-authenticator\src\main\java\fitnesse\authentication\LDAPAuthenticator.java:3: warning: LdapCtxFactory is internal proprietary API and may be removed in a future release
[ERROR] import javax.naming.AuthenticationException;
[ERROR] ^
[ERROR]
[ERROR] c:\Users\araza\Documents\GitHub\fitnesse-ldap-authenticator\src\main\java\fitnesse\authentication\LdapContextFactory.java:[12,26] LdapCtxFactory is internal proprietary API and may be removed in a future release"
Ok, I made some progress and this is what I am getting now:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project fitnesse-ldap-authenticator: Compilation failure
[ERROR] /c:/Users/araza/Documents/GitHub/fitnesse-ldap-authenticator/src/main/java/fitnesse/authentication/LDAPAuthenticator.java:[26,24] isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.LDAPAuthenticator cannot override isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.Authenticator
[ERROR] overridden method does not throw java.lang.Exception
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project fitnesse-ldap-authenticator: Compilation failure
c:/Users/araza/Documents/GitHub/fitnesse-ldap-authenticator/src/main/java/fitnesse/authentication/LDAPAuthenticator.java:[26,24] isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.LDAPAuthenticator cannot override isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.Authenticator
overridden method does not throw java.lang.Exception
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
-
c:/Users/araza/Documents/GitHub/fitnesse-ldap-authenticator/src/main/java/fitnesse/authentication/LDAPAuthenticator.java:[26,24] isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.LDAPAuthenticator cannot override isAuthenticated(java.lang.String,java.lang.String) in fitnesse.authentication.Authenticator
overridden method does not throw java.lang.Exception
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
I assumed knowledge of Git and Maven when I created the FitNesse LDAP Authenticator. To build a jar file:
Use Git to check out the code
Run Maven to create a jar file (mvn package)
The jar will be in the target directory where you checked out the code

org.apache.maven.plugin.MojoExecutionException: protoc failure

I meet some problems when i use maven to complie hadoop from source code.Here is the error, can anyone help me? Thanks.
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (compile-protoc) on project hadoop-c
[Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAP
plugin.MojoExecutionException: protoc failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: org.apache.maven.plugin.MojoExecutionException: protoc failure
at org.apache.hadoop.maven.plugin.protoc.ProtocMojo.execute(ProtocMojo.java:81)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
**Caused by: org.apache.maven.plugin.MojoExecutionException: protoc failure**
at org.apache.hadoop.maven.plugin.protoc.ProtocMojo.execute(ProtocMojo.java:78)
... 21 more
[ERROR]
[ERROR]
The instructions at http://wiki.apache.org/hadoop/HowToContribute explain some of the less obvious aspects of building hadoop - including this one. The main problem here is that Protocol Buffers are required by hadoop's YARN framework, and you most likely do not have them installed.
It seems like the problem might be that your not interpretting the error correctly, so --
How to Isolate the Build error
Any mojo which fails should be associated with a class.
In this case, the mojo that is failing is here :
https://svn.apache.org/repos/asf/hadoop/common/trunk/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java
Looking at the code, its clear that this Mojo requires the "protoc" program to run.
http://code.google.com/p/protobuf/
Solution
To build hadoop, you need protocol buffers. This can be installed on a *NIX machine from source, by running the following commands to grab the code from googlecode (taken from http://numbers.brighterplanet.com/2012/04/14/how-to-install-mosh-on-amazon-ec2/).
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz
tar xzf protobuf-2.4.1.tar.gz
cd protobuf-2.4.1
./configure
make
sudo make install
sudo ldconfig

Categories

Resources