ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john lukar <johnlu...@yahoo.com>
Subject Bug maybe with antcall and dependencies being called eventhough the targets body is never executed.
Date Mon, 04 Aug 2003 20:02:59 GMT

The dependencies for a second target are called but
not the body.  Is this the bug?

See below, the target testClass should NOT be executed
because the if="test.class" returns false since
test.class is never set.

So that is what is happening however not before the
dependencies for testClass target are all called.

I am using Ant version 1.5.1.




I have the following targets:

    <target name="test">
        <antcall target="testSuite"/>
        <antcall target="testClass"/>
    </target>


    <target name="testSuite"
        depends="dist-clean, compile, create-manifest"
        description="- run unit test specified by
test.class defined by app"
        unless="test.class">
        <mkdir dir="${build.dir}/properties"/>
        <copy file="${properties.dir}/MANIFEST.MF"
todir="${build.dir}/properties"/>
        <junit fork="yes" printsummary="yes"
haltonfailure="no">
            <jvmarg
value="-Dlog4j.configuration=./properties/log4j.property"/>
            <jvmarg
value="-DSomeProps1=./properties/junit.property"/>
            <jvmarg
value="-DSomeProps2=./application/data.xml"/>
            <formatter type="plain" usefile="false"/>
            <classpath refid="test.class.path"/>
            <test name="${junit.class}"/>
        </junit>
        <!-- Run the out of VM test target if this
call is part of the main Suite call       -->
        <antcall target="testClientServer"/>
    </target>

    <target name="testClass"
        depends="dist-clean, compile, create-manifest"
        description="- run unit test specified by
test.class defined by app"
        if="test.class">
        <mkdir dir="${build.dir}/properties"/>
        <copy file="${properties.dir}/MANIFEST.MF"
todir="${build.dir}/properties"/>
        <junit fork="yes" printsummary="yes"
haltonfailure="no">
            <jvmarg
value="-Dlog4j.configuration=./properties/log4j.property"/>
            <jvmarg
value="-DSomeProps1=./properties/junit.property"/>
            <jvmarg
value="-DSomeProps2=./application/data.xml"/>
            <formatter type="plain" usefile="false"/>
            <classpath refid="test.class.path"/>
            <test name="${test.class}"/>
        </junit>
    </target>

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


Mime
View raw message