On Mon, Aug 31, 2009 at 13:19, Rebhan,
Gilbert<gilbert.reb...@huk-coburg.de> wrote:
[...]
>
> f.e. =
>
> <target name="check_state">
>  <condition property="${mname}.done">
>    <available file="${ant.working.dir}/${mname}_script.params"/>
>  </condition>
> </target>
>
> <target name="build" depends="check_state" unless="${mname}.done">
> ...
>
>

Yes, but that's one usage scenario. My scenario is not this at all.

To be precise, I'd have liked to write:

<target name="coverage-gen-report"/>

<target name="coverage-mail-report" unless="nomail"/>

<target name="coverage-report" unless="nocoverage"
depends="coverage-gen-report, coverage-mail-report"/>

This way, if nomail was set, the coverage report would have been
generated but no mail would have been sent. And if nocoverage was
sent, nothing would have been done at all, since I believed that
nocoverage being sent meant that coverage-report wouldn't be executed
at all. But no.

What I had to write to accomplish what I wanted is:

<target name="coverage-gen-report" unless="nocoverage"/>

<target name="coverage-mail-report" depends="coverage-gen-report"
unless="nomail">
    <if>
        <not>
            <isset property="nocoverage"/>
        </not>
        <then>
            <!-- do the stuff -->
        </then>
    </if>
</target>

<target name="coverage-report" depends="coverage-gen-report,
coverage-mail-report"/>

Which is a lot more confusing. And I don't want to write an extra task
to check for the existence of the file I have to send via mail.

-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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

Reply via email to