ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Priest <Robert.Pri...@bentley.com>
Subject If statement
Date Mon, 03 Jun 2002 19:20:19 GMT
Can anyone tell me how to write an if statement in Ant?
What task should I read up on?

Basically I need an "if" that does the following:

if Property1 is true and Property2 is true
  begin
	run somefile.exe (using <exec/> task)
  end

I was looking at the condition task, but from what I see it only sets a
property.
Which would be okay if  i could do:

<condition property="run.exec">
   <and>
     <istrue value="${someproperty}" />
     <istrue value="${someproperty}" />
   </ant>
  </condition>

  <exec if="run.exec" ... </exec>

But that does not seem to be the case.

Anyone have any suggestions?

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


Mime
View raw message