I have got involved in a project. This project uses ant which is not something I am comfortable with. I have checked out the source code and tried running ant on the most outer directory.
Running 'ant' in commando prompt takes 1 sec and I get a BUILD SUCCESFULL message. If I run 'ant all' I get a
BUILD FAILED. Java.io.IOExceptio: Cannot run program "ant": CreateProcess=2, the system cannot find the file specified
and then a long stacktrace.
Most of the people on the project runs OS-X while I use Windows XP.
Any help or information is appreciated :)
EDIT:
<target name="-all-submodules">
<subantlight target="all">
<filelist refid="ordered_build_files"/>
</subantlight>
</target>
In another xml file
<macrodef name="subantlight">
<attribute name="target"/>
<element name="files" optional="no" implicit="true" description="Filessets/lists of build files"/>
<sequential>
<apply executable="ant" failonerror="true">
<arg value="-f"/>
<srcfile/>
<arg value="@{target}"/>
<files/>
</apply>
</sequential>
</macrodef>
This is what throws IOException when it hits the line with "apply executeable..".
UPDATED EDIT: If i set the absolute path like this
<macrodef name="subantlight">
<attribute name="target"/>
<element name="files" optional="no" implicit="true" description="Filessets/lists of build files"/>
<sequential>
<apply executable="MyAbsolutePathHereToAnt.bat" failonerror="true">
<arg value="-f"/>
<srcfile/>
<arg value="@{target}"/>
<files/>
</apply>
</sequential>
</macrodef>
Everything works.
I have set ANT_HOME to my ant directory. I have set my JAVA_HOME to Java JDK directory. In my PATH I have set %ANT_HOME%\bin;%JAVA_HOME%\bin
Calling echo %ANT_HOME% produces the right path.
I can't see what I am during wrong here.