ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Davis" <>
Subject ANT can not invoke a test script when called via parent directory build.xml file.
Date Mon, 19 Jun 2006 12:24:34 GMT

This seems to be a simple setup, but I don't know why it does not work.

My directory layout looks like this:

src/build.xml                         <==  Top level build file.
src/psound/build.xml              <==  Sub project build file.
src/psound/playsoundtest.ex   <== sub project test script
src/psound/*                         <== various code files

Invoking ant in the src/psound/ directory will build, deploy, and test
the code OK.

Invoking ant in the src/ directory will pull the psound component from
CVS and then invoke a new ant on the psound subdirectory where it will
in turn do build and deploy.  When it tries to do a test, it fails to
find the test script.  Here is the error:

     [exec] /home/schwarha/jumeirah/tools/src/project/jumeirah/tools/src/psound

/home/schwarha/jumeirah/tools/src/build.xml:16: The following error
occurred while executing this line:
Execute failed:
./playsoundtest.ex: not found

Here are the two build.xml files.

The top level one:
<?xml version="1.0"?>

<project default="main" basedir=".">

    <property name="cvs.dir" value="project" />

    <target name="main" depends="checkout, buildit" >
        <echo> build complete </echo>

    <target name="checkout" >
        <cvs package="jumeirah/tools/src/psound" dest="${cvs.dir}" />

    <target name="buildit" >
        <ant inheritAll="false" dir="project/jumeirah/tools/src/psound"/>

The subdir one:
<?xml version="1.0" encoding = "UTF-8"?>

<project name="psound" default="Build" basedir=".">

    <property name="destDir" location="/opt/nfs/usr/local/test/psound"/>
    <property name="message" value="Building the project"/>
    <property environment="env"/>

    <target name="Build" depends="Test">
        <echo message="${message}"/>

    <target name="Initialization">
        <exec dir="." executable="make" failonerror="true">
            <arg line="clean"/>
        <delete dir="${destDir}"/>

    <target name="Make" depends="Initialization">
        <exec dir="." executable="make" failonerror="true">

    <target name="Install" depends="Make">
        <exec dir="." executable="make" failonerror="true">
            <arg line="install"/>

    <target name="InstallExtra" depends="Install">
        <mkdir dir="${destDir}"/>
        <copy todir="${destDir}">
            <fileset dir=".">
                <include name="*.sh"/>
                <include name="*.wav"/>
        <chmod dir="${destDir}" perm="ugo+x" includes="*.sh"/>

    <target name="Test" depends="InstallExtra">
        <exec dir="." executable="pwd"/>
        <exec dir="." executable="./playsoundtest.ex" failonerror="true">


Any help is apprecitated.

John F. Davis "JD"

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message