I am unable to call an executable from a "sub-build" xml file on Solaris. As
a test I wrote two .xml files, each of which calls "ls"; the main .xml runs
fine, the sub .xml returns -1. ***AND*** with "Windows" mods (changing "ls"
to "dir" ) THE MAIN BUILD FAILS, BUT I CAN REVERSE THE "depends" args, and
the sub-build "dir" works. Any suggestions would be appreciated.
My main build file is:
<project name="snv_build_tester" default="all" basedir=".">
<target name="localsat" >
<echo message="Starting executable"/>
<echo message="BASEDIR is/was ${basedir}"/>
<exec executable="/usr/bin/ls"
output="LS.TXT"
failonerror="yes"
dir="${basedir}" >
</exec>
</target>
<target name="satcall" >
<echo message="Calling subdirectory ant file. "/>
<ant antfile="satbuild.xml"
dir="satdir"
/>
</target>
<target name="all" depends="localsat, satcall" >
<echo message="BASEDIR is/was ${basedir}"/>
</target>
</project>
satdir/satbuild.xml (called from the build file above is:
<project name="snv_subbuild_tester" default="all" basedir=".">
<target name="subdirsat" >
<echo message="Starting executable"/>
<echo message="basedir is ${basedir}"/>
<echo message="ant.home is ${ant.home}"/>
<exec executable="/usr/bin/ls"
output="LSsubdir.TXT"
failonerror="yes"
dir="${basedir}"
>
</exec>
</target>
<target name="all" depends="subdirsat" >
</target>
</project>
And the output I get is:
Ant version 1.3alpha compiled on January 22 2001
Buildfile: satbuild.xml
Detected Java Version: 1.2
Detected OS: SunOS
Project base dir set to: /u02/vss/middletier_ant/dev
Build sequence for target `all' is [localsat, satcall, all]
Complete build sequence is [localsat, satcall, all]
localsat:
[echo] Starting executable
[echo] BASEDIR is/was /u02/vss/middletier_ant/dev
[exec] Myos = SunOS
[exec] /usr/bin/ls
[exec] Output redirected to /u02/vss/middletier_ant/dev/LS.TXT
satcall:
[echo] Calling subdirectory ant file.
Project base dir set to: /u02/vss/middletier_ant/dev/satdir
Project base dir set to: /u02/vss/middletier_ant/dev/satdir
Build sequence for target `all' is [subdirsat, all]
Complete build sequence is [subdirsat, all]
subdirsat:
[echo] Starting executable
[echo] basedir is /u02/vss/middletier_ant/dev/satdir
[echo] ant.home is /u02/vss/middletier_ant/dev/..
[exec] Myos = SunOS
[exec] /usr/bin/ls
[exec] Output redirected to
/u02/vss/middletier_ant/dev/satdir/LSsubdir.TXT
BUILD FAILED
/u02/vss/middletier_ant/dev/satdir/satbuild.xml:13: Exec returned: -1
Total time: 0 seconds
>
???
My investigation stems from trying to fork a java task in a sub-build file.
George McKinney, Developer
tantalus communications inc.
500-1122 Mainland Street
Vancouver, BC, Canada V6B 5L1
[EMAIL PROTECTED]
Direct 604.726.6753
Main 604.609.0700
Fax 604.609.0705
www.tantalus.com
"When eBusiness experience counts."