我需要一个蚂蚁IF-ELSEIF-ELSE条件语句。
我不想使用Ant-的contrib。
我试过的解决方案在这里
<target name="condition.check">
<input message="Please enter something: " addproperty="somethingProp"/>
<condition property="allIsWellBool">
<not>
<equals arg1="${somethingProp}" arg2="" trim="true"/>
</not>
</condition>
</target>
<target name="if" depends="condition.check, else" if="allIsWellBool">
<echo message="if condition executes here"/>
</target>
<target name="else" depends="condition.check" unless="allIsWellBool">
<echo message="else condition executes here"/>
</target>
但是,我必须设置里面的if和else的目标性能,这将不会在调用目标可见。
有没有其他出路使用条件?