多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# B.42 SwitchTask Task definition for the phing task to switch on a particular value. Table B.42:聽Attributes NameTypeDescriptionDefaultRequired`value``String`The value to switch on.n/aYes`caseinsensitive``Boolean`Should we do case insensitive comparisons?falseNo B.42.1 Supported Nested Tags At least one `<case>` or `<default>` is required. `case` An individual case to consider, if the value that is being switched on matches to value attribute of the case, then the nested tasks will be executed. Table B.43:聽Attributes NameTypeDescriptionDefaultRequired`value``String`The value to match against the tasks value attribute.n/aYes `default` The default case for when no match is found. Must not appear more than once per task. B.42.2 Examples ``` <switch value="${foo}"> <case value="bar"> <echo message="The value of property foo is bar" /> </case> <case value="baz"> <echo message="The value of property foo is baz" /> </case> <default> <echo message="The value of property foo is not sensible" /> </default> </switch> ```