Hello,

Would it be useful to add optional "if" and "unless" parameters to the
<fail> task, so that you don't have to go through the rather ugly process of
making a separate little target?

For example, you can currently find yourself in a situation like this
(unless there's a more elegant method I haven't thought of):

    <!-- run junit, generate reports, then fail if errors occurred -->
    <target name="junit">
        <junit failureProperty="junit.failed" ... />
        <junitreport ... />
        <antcall target="check-junit-failures"/>
    </target>

    <target name="check-junit-failures" if="junit.failed">
        <fail message="JUnit failed."/>
    </target>

But it might be nicer to be able to do:

    <!-- run junit, generate reports, then fail if errors occurred -->
    <target name="junit">
        <junit failureProperty="junit.failed" ... />
        <junitreport ... />
        <fail message="JUnit failed." if="junit.failed"/>
    </target>

Or does this get into the ugly arguments about conditionals?

Thanks,
Dave H

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to