Ant文档中的示例如何将环境变量转换为属性:
在您的情况下,您将使用${env.RELEASE_VER}。
然后对于条件部分,这里的文档说有三个可能的属性:
Attribute Description Required
property The name of the property to set. Yes
value The value to set the property to. Defaults to "true". No
else The value to set the property to if the condition No
evaluates to false. By default the property will
remain unset. Since Ant 1.6.3
把它放在一起: