Yes, if you nest the task inside a conditional <target>. Targets have
conditional (if/unless) capability, but not tasks.
jfc wrote:
> Hi,
>
> I have just been looking at the docs and it seems one can set a property
> value conditionally.
>
> Is there a way that I can have a task executed conditionally?
>
> I'd like to say something like :
>
> <condition>
> <!-- predefined property -->
> <property name="myprop" value="aaa">
> <!-- so this copy will only happen if myprop == "aaa" -->
> <copy file="${project.home}/etc/Manifest.mf"
> tofile="${build.home}/ear/war/META-INF/Manifest.mf"/>
> </property>
> </condition>
>
> Thanks
> jfc
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>