Building Hadoop on Windows Error: Ant BuildException

一世执手 提交于 2019-12-22 10:36:13

问题


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)?


回答1:


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



来源:https://stackoverflow.com/questions/25271515/building-hadoop-on-windows-error-ant-buildexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!