在Windows上构建Hadoop错误:Ant BuildException [英] Building Hadoop on Windows Error: Ant BuildException

查看:1779
本文介绍了在Windows上构建Hadoop错误:Ant BuildException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试着在Windows Server 2012上使用Maven 3.2.2构建Hadoop 2.4.1,方法是运行

  mvn package -Pdist, native-win -DskipTests -Dtar 

目前出现以下错误:

  [错误]无法执行目标org.apache.maven.plugins:maven-antrun-plugin:1.7:
run(pre-dist)on项目hadoop-project-dist:出现Ant BuildException异常
:执行失败:java.io.IOException:无法运行程序sh(在目录C:
\ Hadoop \hadoop-2.4 .1-src\hadoop-project-dist\target):CreateProcess error = 2,Th $ b $系统找不到指定的文件
[错误]围绕Ant部分...&exec; exec failonerror =truedir =C:\ Hadoop \hadoop-2.4.1-
src\hadoop-project-dist\targetexecutable =sh> ... @ 31:104在C:\ Hadoop \hadoop
-2.4.1-src\hadoop-project-dist\target\antrun\build-main.xml

我已经alr eady处理了此处描述的Java doclint问题。这是一个类似的问题(即我必须添加一些东西到Ant配置)?

解决方案

您必须将cygwin添加到路径。
阅读此:
http:// www.blogjava.net/Bryan/archive/2014/08/22/417252.html


Trying to build Hadoop 2.4.1 on Windows Server 2012 using Maven 3.2.2 by running

mvn package -Pdist,native-win -DskipTests -Dtar

Currently getting the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:
run (pre-dist) on project hadoop-project-dist: An Ant BuildException has occured
: Execute failed: java.io.IOException: Cannot run program "sh" (in directory "C:
\Hadoop\hadoop-2.4.1-src\hadoop-project-dist\target"): CreateProcess error=2, Th
e system cannot find the file specified
[ERROR] around Ant part ...<exec failonerror="true" dir="C:\Hadoop\hadoop-2.4.1-
src\hadoop-project-dist\target" executable="sh">... @ 31:104 in C:\Hadoop\hadoop
-2.4.1-src\hadoop-project-dist\target\antrun\build-main.xml

I've already dealt with the Java doclint issue described here. Is this a similar issue (i.e. I have to add something to the Ant configuration)?

解决方案

You must add cygwin to the path. Read this: http://www.blogjava.net/Bryan/archive/2014/08/22/417252.html

这篇关于在Windows上构建Hadoop错误:Ant BuildException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆