ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Davis" <davi...@gmail.com>
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
Hello

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:


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

BUILD FAILED
/home/schwarha/jumeirah/tools/src/build.xml:16: The following error
occurred while executing this line:
/home/schwarha/jumeirah/tools/src/project/jumeirah/tools/src/psound/build.xml:49:
Execute failed: java.io.IOException: java.io.IOException:
./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>

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

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




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>

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

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

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

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


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

</project>

Any help is apprecitated.

-- 
John F. Davis "JD"
http://www.skink.net

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message