Building Hadoop on Windows Errors: Ant BuildException

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 the following error appears:

[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 looked at the Java doclint issue described here here . Is this a similar problem (i.e. I need to add something to my Ant config)?

+3


source to share


1 answer


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



+1


source







All Articles