Hi,
You can use if and unless to make a target execute conditionally I
think.
if you use <target name="mytarget" if="my.property"> then the target
will execute
if my.property is true, <target name="mytarget" unless="my.property">
executes
if my.property is not set.
Cheers
.
-----Original Message-----
From: Romain.Rouvoy [mailto:Romain.Rouvoy@lifl.fr]
Sent: 05 March 2002 14:15
To: Ant User Mailing-List
Subject: Conditionnal Task
Hi !
I'm converting a Makefile to a build.xml file in order to use Ant but I
encounter a little problem ! :)
(Is there any tools to perform it ? :) ... )
I want to to use different tasks depending on the value of a specific
property
So for Example when the value of the property is "VisiBroker"
I' want to execute the specific target "compile" and in the other cases
I want to use a default target named "compile"
We can execute a task if a property is set or not but I don't know how
to test the property's value !
I'm sure you understand what I mean ! :)
Thanks !
Romain
--
R. Rouvoy
------------------------------
Romain ROUVOY
USTL Lille 1
--
To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
|