【发布时间】:2015-05-29 03:26:36
【问题描述】:
似乎 ant 唯一可靠提供的属性是“os.name”属性。但是这个名称有变体;谎言“Windows 8”“Windows 7”等
但就我而言,两者都是“Windows”-
有没有办法根据另一个属性值的部分字符串匹配来有条件地设置属性,如下面的伪代码?特别是 os.name 作为源值?使用通用 ant 安装提供的默认任务集?
if(a.property 'contains' "Windows")
another.property = "windows value"
else if(a.property contains 'Linux')
another.property = "linux value"
endif
【问题讨论】: