>ant -Dpropname=xxx // correct usage
>ant // incorrect usage of my build
>
>Can I test a property existence?
>
>if propname not exists (
>   echo "Give more command line arg"
>   exit ant running
>)


You could check that with the <isset> condition.
In that case you would combine it with fail:

<fail>
  Give more command line arg
  <condition>
    <isset property="propname"/>
  </condition>
</fail>

If you can work with default values you can easily set that:
  <property name="propname" value="defaultvalue"/>

Because Ant properties are immutable (once set they cant be changed)
Ant will use the user value (from the command line) if given, otherwise
the default.


For an introduction have a look at the tutorial
http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html


Jan


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

Reply via email to