unmappable character for encoding utf8 - java

While building a project using maven. I am getting this error
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project uidai-auth-client: Compilation failure
[ERROR] /uidai-auth-client-1.6-src/uidai-auth-client/src/main/java/in/gov/uidai/auth/aua/httpclient/NamespaceFilter.java:[91,44] error: unmappable character for encoding UTF-8
[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 uidai-auth-client: Compilation failure
/uidai-auth-client-1.6-src/uidai-auth-client/src/main/java/in/gov/uidai/auth/aua/httpclient/NamespaceFilter.java:[91,44] error: unmappable character for encoding UTF-8
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
/uidai-auth-client-1.6-src/uidai-auth-client/src/main/java/in/gov/uidai/auth/aua/httpclient/NamespaceFilter.java:[91,44] error: unmappable character for encoding UTF-8
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
[ERROR]
Can any one help me in solving this issue.

Apparently, your source file has an encoding which is not UTF-8.
Find out what encoding it is (say ISO-8859-1) and then specify the encoding in your POM like this:
<properties>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
</properties>
It is good practice to always specify the encoding explicitly, to avoid depending on the platform encoding (i.e. operating system defaults). Maven will print a warning otherwise.

Related

Maven deploy file error on Jenkins

I am trying to push json report file to Nexus repo. I set Jenkins job to run
mvn -X -e deploy:deploy-file "-DgeneratePom=true"
"-Durl=http://repo_location"
-DrepositoryId=internal-repository" "-DgroupId=com.devsys" "-DartifactId=report" "-Dbuild.number=%BUILD_NUMBER%"
"-Dpackaging=json"
"-Dfile=%WORKSPACE%\backend-acceptance-tests\target\cucumber.json"
However, getting error:
The parameters 'file' for goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file are
missing or invalid
I even tried absolute path, still same error, json is sitting in the location specified.
Hope to get another set of eyes to provide feedback on such matter?
Full error
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file
(default-cli) on project workbrain-automation-framework: The
parameters 'file' for goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file are
missing or invalid -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file
(default-cli) on project workbrain-automation-framework: The
parameters 'file' for goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file are
missing or invalid at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:220)
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:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483) 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.PluginParameterException: The
parameters 'file' for goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file are
missing or invalid at
org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:581)
at
org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:534)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:97)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
You're missing a quote before -DrepositoryId=. All of your quotes need to be matched up correctly for this to work.

Maven enunciate error: "String index out of range: 0"

When I build my Maven project or generate my eclipse configuration using mvn eclipse:eclipse, I get the following error:
[ERROR] Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.28:docs (default) on project appserver-server: Problem assembling the enunciate app. String index out of range: 0 -> [Help 1]
I have isolated the issue to a single dependency:
<dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-neo4j-graph</artifactId>
<version>2.4.0</version>
</dependency>
I need this dependency, so getting rid of it isn't an option but why is this causing an error in enunciate to appear? Is there any way to fix this?
Edit: after some further testing, the root of the problem may be from this dependency of a dependency of a dependency of a dependency of the previous dependency:
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.10.4</version>
</dependency>
Full error:
[ERROR] Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.28:docs (default) on project appserver-server: Problem assembling the enunciate app. String index out of range: 0 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.28:docs (default) on project appserver-server: Problem assembling the enunciate app.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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.MojoExecutor.executeForkedExecutions(MojoExecutor.java:364)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:198)
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.MojoExecutionException: Problem assembling the enunciate app.
at org.codehaus.enunciate.DocsMojo.execute(DocsMojo.java:100)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 23 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:658)
at org.codehaus.enunciate.main.ImportedClassesClasspathHandler.handleResource(ImportedClassesClasspathHandler.java:55)
at org.codehaus.enunciate.main.Enunciate.scanClasspath(Enunciate.java:462)
at org.codehaus.enunciate.main.Enunciate.doGenerate(Enunciate.java:355)
at org.codehaus.enunciate.ConfigMojo$MavenSpecificEnunciate.doGenerate(ConfigMojo.java:670)
at org.codehaus.enunciate.main.Enunciate$Stepper.step(Enunciate.java:1799)
at org.codehaus.enunciate.main.Enunciate$Stepper.stepTo(Enunciate.java:1831)
at org.codehaus.enunciate.DocsMojo.execute(DocsMojo.java:96)
... 25 more
Yep. That was reported and fixed here.

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