5

我正在尝试使用 Maven 构建 Hadoop 主干。我用svn得到了这个项目。但后来,我试过了mvn clean install。但我收到以下错误:

[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

我尽我所能用谷歌搜索。有人可以告诉我为什么会这样吗?

4

2 回答 2

7

找到了解决方案。sudo chown -R username parent-directory如果您还没有,请执行此操作。现在试试,mvn install -DskipTests。一切都应该很好,你应该得到BUILD SUCCESS.

PS:谢谢ThomasJungblut

于 2013-06-16T17:33:02.050 回答
1

尝试运行 'protoc' 并验证它是否安装了正确的 GCC 库。这是我在从源代码构建时遇到的问题。当我在一个窗口中运行命令时发生了这种情况,在该窗口中我为一个软件程序提供了一堆库配置,这似乎搞砸了正确的库加载。

我已经从源代码构建并安装了 google protoc,下载了 maven,安装并处理了 hadoop-common 的原始 git。与标准 Centos6 相比,没有其他准备工作有所改变。

于 2013-06-17T15:56:29.223 回答