ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: unique target names?
Date Tue, 05 Sep 2006 06:25:35 GMT
no you cant
The pattern for that is

<target name="x" depends="-x.if,-x.unless"/>
<target name="-x.check">
    <!-- set property x conditional -->
</target>
<target name="-x.if" if="x" depends="-x.check">
    ...
</target>
<target name="-x.unless" unless="x" depends="-x.check">
    ...
</target>


(the prepending '-' means, that you cant invoce that from the command line, because
'-' starts a property declaration)


Jan

>-----Urspr√ľngliche Nachricht-----
>Von: chris.chiasson@gmail.com 
>[mailto:chris.chiasson@gmail.com] Im Auftrag von Chris Chiasson
>Gesendet: Dienstag, 5. September 2006 08:01
>An: user@ant.apache.org
>Betreff: unique target names?
>
>Is it possible to have a target name be shared between two 
>targets and use the if and unless attributes to control which 
>one will execute? Do you have a documentation link? The ant 
>DTD doesn't prevent it, but it seems like ant doesn't take 
>DTDs very seriously anyway.
>
>--
>http://chris.chiasson.name/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
>additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message