Installing snappy for hadoop fails - maven

I'm following the installation instructions for snappy from here https://code.google.com/p/hadoop-snappy/ . However, I'm not able to complete step 3. I did configure, make, sudo make install and snappy lies in the correct dict in /usr/local. So the next step is installing snappy for hadoop. Therefore as describe I call
snappy-1.1.2 Tom$ mvn -e package
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.123s
[INFO] Finished at: Wed Mar 05 22:12:10 CET 2014
[INFO] Final Memory: 6M/82M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/Tom/Downloads/snappy-1.1.2). Please verify you invoked Maven from the correct directory. -> [Help 1]
org.apache.maven.lifecycle.MissingProjectException: The goal you specified requires a project to execute but there is no POM in this directory (/Users/Tom/Downloads/snappy-1.1.2). Please verify you invoked Maven from the correct directory.
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
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:601)
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)
[ERROR]
[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/MissingProjectException
So, aparently there is no POM file available. Also in the source directory of snappy I do not see any POM files:
snappy-1.1.2 Tom$ ls
AUTHORS config.guess install-sh snappy-sinksource.cc snappy-test.h
COPYING config.h libsnappy.la snappy-sinksource.h snappy.cc
ChangeLog config.h.in libtool snappy-sinksource.lo snappy.h
INSTALL config.log ltmain.sh snappy-sinksource.o snappy.lo
Makefile config.status m4 snappy-stubs-internal.cc snappy.o
Makefile.am config.sub missing snappy-stubs-internal.h snappy_unittest
Makefile.in configure snappy-c.cc snappy-stubs-internal.lo snappy_unittest-snappy-test.o
NEWS configure.ac snappy-c.h snappy-stubs-internal.o snappy_unittest-snappy_unittest.o
README depcomp snappy-c.lo snappy-stubs-public.h snappy_unittest.cc
aclocal.m4 format_description.txt snappy-c.o snappy-stubs-public.h.in stamp-h1
autogen.sh framing_format.txt snappy-internal.h snappy-test.cc testdata
I checked that the requirements (maven3, java 6 etc) are fullfilled. So, how do I get this command to run?

Okay, question has been answered here: mvn and the make package error
In a nutshell: Go to https://github.com/electrum/hadoop-snappy download the zip and run the mvn package command inside the directory where the pom.xml lies. That's it.

Related

Jenkins/Maven build dying with "Could not find the selected project in the reactor" error

I’m using Jenkins on the Cloudbees build service and nave a multi-module Maven project. Recently, we removed a project from our parent pom, however, when we run the build in Jenkins with the following options …
clean install -e -P qa -P cloudbees -DskipITs
The artifacts are automatically stored into a Cloudbees snapshot repository attached to our account. However, the build ultimately fails with the below “Could not find the selected project in the reactor: org.mainco.subco:oldmodule” error. Is there a way to force the build to
[subco] $ mvn initialize -N
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building subco 76.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.841s
[INFO] Finished at: Fri Feb 27 21:59:22 UTC 2015
[INFO] Final Memory: 5M/115M
[INFO] ------------------------------------------------------------------------
Parsing POMs
Modules changed, recalculating dependency graph
maven31-agent.jar already up to date
maven31-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[subco] $ /opt/jdk/jdk1.7.0/bin/java -Dmaven.test.failure.ignore=false -cp /scratch/jenkins/maven31-agent.jar:/opt/maven/apache-maven-3.1.1/boot/plexus-classworlds-2.5.1.jar:/opt/maven/apache-maven-3.1.1/conf/logging jenkins.maven3.agent.Maven31Main /opt/maven/apache- maven-3.1.1 /scratch/jenkins/slave.jar /scratch/jenkins/maven31-interceptor.jar /scratch/jenkins/maven3-interceptor-commons.jar 52053
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /scratch/jenkins/workspace/subco/subco/pom.xml -amd -pl org.mainco.subco:oldmodule,org.mainco.subco:subco,org.mainco.subco:moduleB,org.mainco.subco:database,org.mainco.subco:moduleF,org.mainco.subco:moduleA,org.mainco.subco:moduleH,org.mainco.subco:newmodule,org.mainco.subco:session,org.mainco.subco:moduleA,org.mainco.subco:newmodule,org.mainco.subco:moduleB clean install -e -P qa -P cloudbees -DskipITs
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.mainco.subco:moduleA:jar:76.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-antrun-plugin # line 508, column 12
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.mainco.subco:newmodule:jar:76.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:aspectj-maven-plugin is missing. # line 200, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[ERROR] Could not find the selected project in the reactor: org.mainco.subco:oldmodule -> [Help 1]
org.apache.maven.MavenExecutionException: Could not find the selected project in the reactor: org.mainco.subco:oldmodule
at org.apache.maven.DefaultMaven.trimSelectedProjects(DefaultMaven.java:750)
at org.apache.maven.DefaultMaven.createDependencyGraph(DefaultMaven.java:704)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:287)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
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.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
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 hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:324)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Take a look at what Maven is executing:
Executing Maven: -B -f /scratch/jenkins/workspace/subco/subco/pom.xml -amd -pl org.mainco.subco:oldmodule,org.mainco.subco:subco,org.mainco.subco:moduleB,org.mainco.subco:database,org.mainco.subco:moduleF,org.mainco.subco:moduleA,org.mainco.subco:moduleH,org.mainco.subco:newmodule,org.mainco.subco:session,org.mainco.subco:moduleA,org.mainco.subco:newmodule,org.mainco.subco:moduleB clean install -e -P qa -P cloudbees -DskipITs
In the -pl part is your old module. As you tell maven to use the parent project to build a module that's no longer part of that project, it fails.
Where is that command generated? Is suspect the old module be in one of your maven profiles or the Jenkins configuration.

maven scm does not listen to perforce trigger output

Hello Maven / Perforce Experts,
I am trying to implement auto versioning of the maven artifacts for a project that uses Perforce as VCS. That made me choose maven-scm-plugin and maven-release-plugin to achieve my purpose.
We use triggers in perforce, which checks for violations in the xml content for each commit.
checkstyle_xml change-content //depot/project/....xml " /p4/triggers/checkstyle-trigger.pl %user% %changelist% /p4"
Unfortunately, when I run the command “mvn -X -e -B scm:edit release:update-versions scm:checkin“ to edit the file, update the version and submit to perforce, maven does NOT honor the result from the perforce trigger and fails the build. However, as you can see the change is submitted to perforce eventually.
STACK TRACE USING XML WHICH HAS TRIGGER ENABLED
[DEBUG] Sending changelist:
Change: new
Description:
Auto increment pom version during build process. Reviewed by: RE
Files:
//depot/project/pom.xml
[ERROR] Provider message:
[ERROR] Unable to submit
[ERROR] Command output:
[ERROR] Debug: starting trigger script
Change 351157 submitted.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.112s
[INFO] Finished at: Thu Oct 30 14:51:51 PDT 2014
[INFO] Final Memory: 23M/219M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.7:checkin (default-cli) on project phoenix: Command failed.Unable to submit -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.7:checkin (default-cli) on project phoenix: Command failed.Unable to submit
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: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.MojoExecutionException: Command failed.Unable to submit
at org.apache.maven.scm.plugin.AbstractScmMojo.checkResult(AbstractScmMojo.java:439)
at org.apache.maven.scm.plugin.CheckinMojo.execute(CheckinMojo.java:83)
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
I submitted the file locally to ensure perforce trigger doesn’t spit a failure status code and it actually returns SUCCESS too.
I am not sure why maven wont honor the perforce triggers.
p4 –u testuser submit -d "Test" pom.xml
Submitting change 351166.
Locking 1 files ...
edit //depot/project/pom.xml#25
Debug: starting trigger script
Change 351166 submitted.
$ echo $?
0
I tested a scenario with a txt file which doesn’t have perforce trigger enabled and maven returns build result as SUCCESS, because technically it doesn’t go through a perforce trigger
STACK TRACE USING TXT WHICH DOESNT HAVE TRIGGER
[DEBUG] Sending changelist:
Change: new
Description:
Auto increment pom version during build process. Reviewed by: RE
Files:
//depot/phoenix/auto-increment-pom/pom.txt
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.998s
[INFO] Finished at: Thu Oct 30 14:55:04 PDT 2014
[INFO] Final Memory: 18M/216M
[INFO] ------------------------------------------------------------------------
QUESTION:
Has anyone experienced this behavior with maven and how did you workaround?
Would you know if it is possible to disable perforce trigger for a particular file, so that perforce doesn’t even go through the trigger
You can use exclusionary syntax (a leading hyphen in the path field) in your triggers table to specify that certain files or patterns are not to run the trigger.
There is an example of this in the 'p4 triggers' documentation: http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_triggers.html
Be careful with this syntax, it's a little persnickety:
The triggers are grouped based on trigger name and type
The order of the lines in the trigger table for a group matters
There is also a knowledge base article for this feature that goes into some more detail: http://answers.perforce.com/articles/KB_Article/Excluded-Trigger-Paths-Not-Being-Recognized

Build from GIT Repository

I'm trying to build geoexplorer.war from github : https://github.com/boundlessgeo/suite/tree/master/geoexplorer, I already Installed maven, Java, Ivy, Ant, Python, Git for windows, Ruby. But still I cant build geoexplorer.war , it said no POM.
According to Instruction I use mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.148 s
[INFO] Finished at: 2014-07-08T01:18:40+08:00
[INFO] Final Memory: 4M/85M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
in this directory (C:\Users\user1\suite\geoexplorer). Please verify you invoked
Maven from the correct directory. -> [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/MissingProject
Exception
According Suggestion I use ant
C:\Users\user1\suite\geoexplorer>ant
Buildfile: C:\Users\user1\suite\geoexplorer\build.xml
help:
BUILD FAILED
C:\Users\Mikah\suite\build\common.xml:35: Execute failed: java.io.IOException: C
annot run program "ant": CreateProcess error=2, The system cannot find the file
specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
at java.lang.Runtime.exec(Runtime.java:620)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
ute.java:862)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
e file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
... 24 more
Total time: 0 seconds
Any solution? I'm really new in this Git, Ant and Maven things.
Looks like the project is in the midst of build process overhaul.
I'd try checking out a released branch (git checkout r4.1 : https://github.com/boundlessgeo/suite/tree/r4.1/geoexplorer ) and building that with maven, as it has pom.xml.
It looks like the project uses Ant now instead of Maven:
https://github.com/boundlessgeo/suite/commit/f4e3adcb3ca70bd2811f9f475d5ca6443013ec74

Maven creating a jar package

When I run this command:
mvn -e package
I got this error:
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/local/apache-maven-3.1.1/conf/settings.xml
[DEBUG] Reading user settings from /root/.m2/settings.xml [DEBUG] Using local repository at /root/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /root/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.090s
[INFO] Finished at: Thu Apr 24 11:47:01 CEST 2014 [INFO] Final Memory: 12M/362M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in
this directory (/root/src/storm-starter). Please verify you invoked Maven from the
correct directory. -> [Help 1] org.apache.maven.lifecycle.MissingProjectException: The
goal you specified requires a project to execute but there is no POM in this directory
(/root/src/storm-starter). Please verify you invoked Maven from the correct directory.
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
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)
[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/MissingProjectException
Maven requires a file named pom.xml in the directory at which you have your project and are executing maven in.
That is the default; if you have another file as your pom.xml like you described in your comment, m2-pom.xml you'll have to inform maven about it with the -f flag.
mvn -f m2-pom.xml clean package

Building Hadoop with Maven - "Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (create-testdirs)"

I'm trying to build the Hadoop trunk using Maven. I got the project with svn. But then, I tried mvn clean install. But I'm getting the following error:
[INFO] Apache Hadoop Main ................................ SUCCESS [1.616s]
[INFO] Apache Hadoop Project POM ......................... FAILURE [0.322s]
[INFO] Apache Hadoop Annotations ......................... SKIPPED
[INFO] Apache Hadoop Project Dist POM .................... SKIPPED
.... etc ....
.... etc ....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.361s
[INFO] Finished at: Sat Jun 15 20:52:13 IST 2013
[INFO] Final Memory: 18M/43M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (create-testdirs) on project hadoop-project: Error executing ant tasks: /home/sreejith/svn/hadoop-trunk/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.6:run (create-testdirs) on project hadoop-project: Error executing ant tasks: /home/sreejith/svn/hadoop-trunk/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:601)
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: Error executing ant tasks: /home/sreejith/svn/hadoop-trunk/hadoop-project/target/antrun/build-main.xml (No such file or directory)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:287)
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: /home/sreejith/svn/hadoop-trunk/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:104)
at org.codehaus.plexus.util.FileUtils.fileWrite(FileUtils.java:470)
at org.apache.maven.plugin.antrun.AntRunMojo.writeTargetToProjectFile(AntRunMojo.java:499)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:226)
... 21 more
I googled all I could. Could someone give me a clue why this is happening?
Found a solution. Do a sudo chown -R username parent-directory if you haven't already. Now try, mvn install -DskipTests. Everything should go fine and you should get BUILD SUCCESS.
P.S: Thanks ThomasJungblut
Try running 'protoc' and verify that it has the right GCC libraries installed. That was a problem I had on a build from source. It happened when I ran the command in a window where I had sourced a bunch of library configs for a software program, which seemed to screw up the proper library loading.
I had built and installed the google protoc from source, and downloaded maven, and installed, and worked off the raw git of hadoop-common. No other prep work changed from standard Centos6.

Resources