Try the flow control tasks that are in the AntXtras third party
package @ antxtras.sf.net.

For your example:
  <do if="props.someprop">
    <exec.../>
  </do>

If you'd like to make sure the property is "true" use:
  <do ifTrue="props.someprop">
    <exec.../>
  </do>

For multiple properties something like:
  <do ifall="prop1,prop2,prop3">
     <exec.../>
  </do>

HTH,
-The Wabbit


warhero wrote:
<?xml version="1.0" encoding="utf-8" />
<project name="testing" default="test2" basedir="./">
        
        <property file="build.properties" />
        
        <target name="test1">   
                <!-- if props.someprop --> ##how use some logic based on a 
property from
the props file that will either execute the "exec" or just pass it?
                        <exec executable"myExecutable" >
                                <arg line="-some-command" />
                        </exec>
                <!-- end -->
        </target>
        
        <target name="test2" depends="test1">
                <exec executable="anotherExecutable">
                        <arg line="-some-command" />
                </exec>
        <target>
        
</project>

So what im trying to do is only execute if a property is true.. Obviously
some pretty simple logic but doing that in ant?

thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to