hadoop 2.3.0源代码生成错误

z9ju0rcb  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(387)

我正在尝试构建hadoop.2.3.0。发出以下命令:

mvn package -Pdist,native -DskipTests -Dtar

正在获取以下错误。

[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]有关错误和可能的解决方案的详细信息,请阅读以下文章:[error][help 1]http://cwiki.apache.org/confluence/display/maven/mojoexecutionexception [错误][错误]更正问题后,可以继续

voase2hg

voase2hg1#

发生错误的原因是代码所在文件夹的权限。我用sudo运行了这个命令,错误得到了解决,我可以在没有任何问题的情况下进行构建。
sudo mvn包-pdist,native-dskiptests-dtar

相关问题